Hello.
This question is not specifically about game programming but the problem code is in a game I'm making so I wasn't sure where to put this thread.
Anyways here's the snippet of code for the win/lose conditions :
Code:
//-------------------- WIN / LOSE ------------------------------------------\\
if (player.hp=<0||0&&enemy.hp=>0) {cout<<"\n\n\nYOU LOST";}
else if (enemy.hp=<0||0&&player.hp=>0) {cout<<"\n\nYOU WIN !!!\n\nCONGRATULATIONS !!!";}
else if (player.hp&&enemy.hp=<0||0){cout<<"\n\nIT IS A DRAW";}
On this line :
Code:
else if (enemy.hp=<0||0&&player.hp=>0) {cout<<"\n\nYOU WIN !!!\n\nCONGRATULATIONS !!!";}
It says there's a syntax error before else. Could someone please tell me why 'cos I can't see what I'm doing wrong. If it matters I'm using Dev 4.9.9.0 on Windows 98. Thanks