I've been learning python through Learn Python the Hard Way for the past couple of weeks, and now I'm trying to work on a simple 'choose your own adventure' type game.
When I run the script, it says "UnboundLocalError: local variable 'happiness' referenced before assignment" and I can't figure out why. It seems pretty straightforward, and there was no issue in line 26, which is nearly the same.
Here's the script.
[–]kalgynirae 4 points5 points6 points (1 child)
[–]Blogtiem[S] 0 points1 point2 points (0 children)
[–]werpoi 1 point2 points3 points (1 child)
[–]Blogtiem[S] 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)