Hi guys/gals,
Sorry this is so basic, but I’m pulling my hair out with this one.
At the end of my game it checks to see if the score you just got is higher than the highscore and changes the game over message accordingly. This is the code I have
[lua]if playeronescore > highScore then
print(“Set new high score!!”)
highScore = playeronescore
gameoverMessage.text=“A NEW HIGH SCORE!!”
else
gameoverMessage.text=“You scored”
end[/lua]
When it runs (and you’ve set a high score) it prints to the console to say a new high score has been set, but then runs the second part of the statement and sets the gameover message to say “You scored”.
What am I doing wrong on this???
[import]uid: 7841 topic_id: 23576 reply_id: 323576[/import]