Hello, I am a beginner and just managed to make my first build. It’s running fine in the simulatar but when I start the app in my phone I see the following error:
Runtime Error
C:\Users\username\docume~1\outlaw\sandbox\38\gamePlay.lua:250: attempt to index local ‘healthDisplay’ (a nil value)
here is what healthDisplay looks like in my code:
if health==5 then local healthDisplay = display.newImage("/images/health.png") healthDisplay:scale(0.6,0.6) healthDisplay.x =screenRight - 60 healthDisplay.y=screenTop + 17 sceneGroup:insert(healthDisplay)
I have everything I’m using in one folder and it runs fine in the simulator. I don’t know whats going wrong here. Am I doing something wrong while making the apk ? Please Help.