Learn to Code via Tutorials on Repl.it!

← Back to all posts
PLS HELP ME MAKE A HEALTH RPG SYSTEM!!
yBen2201

guys I am learning python and I started creating a simple RPG game to kill monsters, animals, gain XP, rank up and stuff...
I already did some quests for killing a wolf but I cannot do a HP system to lose Health and heal after a battle or a hunt.
I'll appreciate if someone help me

Comments
hotnewtop
Highwayman
yBen2201

@Highwayman It didn't work

yBen2201

@Highwayman It says "Local variable 'health' defined in enclosing scope on line 1 referenced before assignment"

Highwayman

🤷‍♂️ I don’t really use python that much. Idk. @yBen2201

Spacecraft

This should be posted in ASK, not the TUTORIALS section.