Bug(s ?) in my code | main.lua:1201: attempt to index local 'pSprite' (a nil value)
Posted: Sat Dec 14, 2019 2:56 pm
Hi i'm Neil and today I have un little big problem...
I develop a game (called Retrail) and for implemented sprite easily i've maked functions factory.
And when the player collide with a trap or an ennemie and die (after the level 6), the game crash.
So... what is the problem
___________________________________________________
Debug :
Error
main.lua:1201: attempt to index local 'pSprite' (a nil value)
Traceback
main.lua:1201: in function 'updateSprite'
main.lua:1312: in function 'update'
[C]: in function 'xpcall'
____________________________________________________
When collision with a trap...
when collision with the ennemie...
And the code...
I develop a game (called Retrail) and for implemented sprite easily i've maked functions factory.
And when the player collide with a trap or an ennemie and die (after the level 6), the game crash.
So... what is the problem
___________________________________________________
Debug :
Error
main.lua:1201: attempt to index local 'pSprite' (a nil value)
Traceback
main.lua:1201: in function 'updateSprite'
main.lua:1312: in function 'update'
[C]: in function 'xpcall'
____________________________________________________
When collision with a trap...
when collision with the ennemie...
And the code...