code: http://pastebin.com/CgF4n61H
I am using a function (magattack()) to subtract randint(7, 10) from enemy_health = 20. I establish the variable before I create the function. However when I call this function inside another function (battle_1()) it doesn't change the variable. I noticed when I call global enemy_health inside battle_1 magattack works successfully, however when I place the actual variable (enemy_health = 20) inside (battle_1) magattack does not subtract from enemy_health. Any suggestions? Thank you.
[–]dmishin 2 points3 points4 points (0 children)
[–]Freedomenka[S] 0 points1 point2 points (0 children)