Program freezes when I touch the third poison vial.
Hey guys, So I managed to get a life counter setup, however as soon as I touch the third poison vial the game freezes. I have tried several things but this is my first attempt at coding and after about an hour of tinkering I'm not too sure where to go .
I feel that my function on line 129 being a duplicate may be causing an issue. linked to my code in line 169.
my though process was as follows. create the variable deathMessage. mimic the function used for winning message that gives placement on the screen. ( I worked on the basis that you either win or lose so both having the same position should be fine as only one would be called )
I then created an if statement that says if lives=== 0 deathMessage should be called and text should be shown saying GAME OVER.
It is possible that I missed something in the videos explaining this process.
Would be grateful for any assistance, with a good explanation