Hi, I’m making a clock with a scene for a Certain time of the day but there is a problem where then is expected near is but when I do it says the same thing.
function setup()
if os.time() is 7.00 until 19.00 then do
sprite("Platformer Art:Cloud 1", 800, 600)
sprite("Platformer Art:Cloud 2", 300, 300)
sprite("Platformer Art:Cloud 3", 400, 200)
fill(254, 255, 0, 255)
ellipse(200, 650, 150, 150)
end
function setup()
end
function draw()
background(40,40,50)
d=os.date("*t")
if d.hour >=7 and d.hour<=19 then
sprite("Platformer Art:Cloud 1", 800, 600)
sprite("Platformer Art:Cloud 2", 300, 300)
sprite("Platformer Art:Cloud 3", 400, 200)
fill(254, 255, 0, 255)
ellipse(200, 650, 150, 150)
end
end
@kirorp Or you can use this if you want to use hours and minutes.
function setup()
end
function draw()
background(40,40,50)
d=os.date("*t")
hm=d.hour*100+d.min
if hm >=715 and hm<=1923 then
sprite("Platformer Art:Cloud 1", 800, 600)
sprite("Platformer Art:Cloud 2", 300, 300)
sprite("Platformer Art:Cloud 3", 400, 200)
fill(254, 255, 0, 255)
ellipse(200, 650, 150, 150)
end
end