Program exiting instead of running

In my code, the dragon_encounter function is not running when it is called. A few days ago I encountered a similar issue with another repl but this is a different issue. With the other repl, the issue was I was calling the wrong function. With this one i’m calling the intended function but it, instead of running it, exits the program. I have implemented print statements to see if the function is indeed not running and it isn’t. Please help!

The function is called on lines:

And 518.

The function is on line 639.

Update: I found and fixed the issue. No further assistance is required.

Hey @Gallus17. It’s great to hear that you’ve fixed your problem, but please provide an explanation to how you did, so that other people who have the same problem know the solution.

1 Like

The issue was with the ‘while dragon_health > 0 and player_health >0:’ line. The function would run when that line was not present. So by moving it within the function I solved the problem.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.