Hello guys
I tried to make this function
local bg = display.newImage("bg.png") bg.x = 12 function move(self , event) self.x = self.x - 10 end bg.enterframe = move Runtime:addEvenListener("enterframe", bg ) function win() if bg.x = -100 then print ("you win") end end win()
But when I run It it says ‘’ Error ''then" expected near “=” …"
How can I solve it??