code isnt working in lua
init = function() x = 0 y = 0 end
update = function() if keyboard.LEFT == 1 then x = x-1 end if keyboard.RIGHT == 1 then x = x+1 end if keyboard.UP == 1 then y = y+1 end if keyboard.DOWN == 1 then y = y-1 end end
draw = function() screen:clear() screen:drawSprite("sprite",x,y,100,100) end
wont draw the sprite? plz help