This question already has an answer here:
I seem to have issues with my if and else if statements, I seem to be getting errors whenever I try to run my program
They're strucutured like this:
if (Spelerle < 1){
System.out.printline("\t Your body feels too heavy as you have sustained too much damage to continue.");
break;}
else if(invoer.equals("2")){
if (HPdrink > 0 )
Spelerle += HPgenezing;
HPdrink--;
System.out.printline("You healed yourself for 44 HP! You now have " + Spelerle + " HP" + "\nYou now have " + HPgenezing + " left");}
This goes on for another 2 if statements and whenever I try to run it, I get
java: Cannot find symbol
symbol: method printline(java.lang.String)
location: variable out of type java.io.PrintStream
Does anyone have any clues? Thanks!
Aucun commentaire:
Enregistrer un commentaire