[noob] code outside main functions. microscript
so yes. i write something smol. i wanted to make global variables outside of init, draw and update functions. will it work?
so yes. i write something smol. i wanted to make global variables outside of init, draw and update functions. will it work?
Yes 😁 Actually, any variables you make that are not marked with local, are global variables.
Yes.
g=999
init = function()
end
update = function()
g += 1
end
draw = function()
screen.clear("rgb(0,0,0)")
screen.drawText(g, 0, 0, 12, "rgb(255,0,0)")
end
fine i wont. lool. was using JS for some time and phyton. but its good to learn new things too :'D thx anyways <3