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

8th Feb 2020, 2:49 PM
Bibek
Bibek - avatar
2 Respuestas
+ 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.
8th Feb 2020, 3:00 PM
Shadow
Shadow - avatar
+ 1
how are you inputting values? all at once then submit or one by one?
8th Feb 2020, 3:00 PM
Bahhaⵣ
Bahhaⵣ - avatar