in my code I have a variable named "times" and I am trying to add one to that variable
I do so with:
times+=1 |
however it throws this strange error
syntax error line 12 (tab 2) times+=1 ')' expected near '=' |
my whole code is this:
function move_x(x,obj,flag) local times=0 local my_x=obj.x repeat my_x+=x/abs(x) if (collide(obj,flag)) then times=abs(x)-1 end times+=1 until (times = abs(x)) end |
plz help!
1
It's just the "until" line. You're using assignment (=) where you meant equality (==)
[Please log in to post a comment]