Hi guys,
I’ve been asked to re-write my code to make it more readable and add some print statements so it’d be easier to determine where the problem is at. So I started from scratch again but I’m still getting some weird behavior.
Allow me to explain:
Everything works fine when I play through level 1 for the first time. When you’ve won the level you can choose the play the level again in a level selection screen. But when I open level 1 again, things aren’t what they are supposed to be. Because I’m getting an error called “ERROR: /Volumes/USB Bram Va/Game/level1.lua:332: physics.start() must be called before physics.stop()”. But I’m perfectly able to play the game again without having issues except that error. The problem starts occurring after I close level 1 for the second time and also when I re-open the level again. Because I’m getting tons of “ERROR: /Volumes/USB Bram Va/Game/level1.lua:332: physics.start() must be called before physics.stop()” errors when the level is closed.
I feel like it is weird because I clearly start and top my physics when the game starts and ends.
Any suggestion would be a step in the right direction so please, take a guess
Thanks in advance
Bram