so i've been trying make text rpg game using java, keep running error
mage.java:12: error: cannot find symbol teammate.sethealth( teammate.gethealth() + 25 ); ^ symbol: method gethealth() location: variable teammate of type character 1 error my code
public int heal(character teammate){ // heals target mana -= 20; teammate.sethealth( teammate.gethealth() + 25 ); } i've defined gethealth , sethealth in class file. ideas how work?
java thinks Сharacter - base type java.lang.character, has no method gethealth(). replace
public int heal(character teammate){ on
public int heal(your.full.package.name.character teammate) {
Comments
Post a Comment