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!
P#98286 2021-10-06 16:22
[Please log in to post a comment]