0
Why is this bug appearing in my game?
Please tell me why am I getting a bug where before I type the attack I lose here I have defined everything in my code Help me plzz https://code.sololearn.com/cl385SyB0ny6/?ref=app
2 Respostas
+ 2
You lose because the lines
hp, eh = 100;
power, ep = 100;
don't assign 100 to both values, but only to "eh" and "ep". Use the assignment operator for chained assignments:
hp = eh = 100;
power = ep = 100;
Also, on a sidenote, a comment like
// ... \\
is a multiline comment because \\ tells the compiler to append the next line to the current, so any statement on the next line would be part of the comment, although not visible, and therefore without effect.
+ 1
how are you inputting values?
all at once then submit or one by one?