Hello, I’m in final stage of development of my game, and I have a serious bug that seems that cannot be fixed.
This is the problem,
I have the character variable(which contains an image), called pers.
It has a initial X and Y value, and changes every frame.
The stage ends when the timer goes zero(from 60, a minute), and then it goes back to the stage selection screen again. The problem is, if I go back to the game, the character will not move anymore, and then the error appears:
“attempt to concatenate field ‘x’ (a nil value)” - this is when I tried to PRINT the pers.x, if I remove that print, the error is
“attempt to perform arithmetic on field ‘x’ (a nil value)”
The problem is, when I print before the pers.x and pers.y BEFORE the game starts, it shows a number, but when the game itself starts, it somehow changes to nil, which I didn’t coded at all.
Please help, I need to solve this problem to end this game asap.
[import]uid: 69287 topic_id: 24246 reply_id: 324246[/import]