Discord
Login
Community
DARK THEME

Why does my code keep asking me for an expression?

Im trying to make a timer so that when 15 seconds pass, my character will ask for help from the player. It however, keeps asking for an expression, i dont know whats happening or why its happening

Heres my code for reference (im new)

init = function()

//timer of the custcene seconds = 15 time = 1

end

update = function()

//make the timer tick if seconds -= 15 then seconds -= time end

if seconds -= 0 then screen.drawText("Hello...?", -150, 75, <'#000000'>) end

end

draw = function() screen.clear

end

This isn't html! You don't need "<>" to define a rgb element. Just put it in a string! EX:

if seconds -= 0 then screen.drawText("Hello...?", -150, 75,20, '#AAA') end

You were also missing your size (for the text) so I've put that in too, its the 20!

https://microstudio.io/i/Monkeyy/rgbexpression/

You most likely won't see the text in your version (Its set to pitch black, So I've changed it)

thank you!

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community