i got a compile error.... i hope some1 can help me :confused:
here are the 2 methods:
Code:
public boolean checkEmpty2() {
if((getItems().freeSlots() == 28 && playerEquipment[playerHat] == -1) && summoningnpcid == 0 && (playerEquipment[playerCape] == -1) && (playerEquipment[playerAmulet] == -1) && (playerEquipment[playerChest] == -1) && (playerEquipment[playerShield] == -1) && (playerEquipment[playerLegs] == -1) && (playerEquipment[playerHands] == -1) && (playerEquipment[playerFeet] == -1) && (playerEquipment[playerWeapon] == -1)) {
getDungeoneering().startfloor1(c);
Client c = (Client) Server.playerHandler.players[this.playerId];
return true;
} else {
sendMessage("Please bank your items if you want to enter Dungeoneering");
return false;
}
}
Code:
public boolean checkEmpty() {
if((getItems().freeSlots() == 28 && playerEquipment[playerHat] == -1) && summoningnpcid == 0 && (playerEquipment[playerCape] == -1) && (playerEquipment[playerAmulet] == -1) && (playerEquipment[playerChest] == -1) && (playerEquipment[playerShield] == -1) && (playerEquipment[playerLegs] == -1) && (playerEquipment[playerHands] == -1) && (playerEquipment[playerFeet] == -1) && (playerEquipment[playerWeapon] == -1)) {
getDungeoneering().startfloor1(c);
Client c = (Client) Server.playerHandler.players[this.playerId];
return true;
} else {
sendMessage("Please bank your items if you want to enter Dungeoneering");
return false;
}
}
i don't know where/how to add the variable
EDIT: startfloor1() method
Code:
public void startfloor1(Client c) {
if (c.dungn > 1) {
c.sendMessage("Please relog.");
return;
}
spawnDungNpc();
gameRoom.put(c, 1);
for(int i = 0; i < startItems.length; i++) {
c.getItems().addItem(startItems[i], 1);
}
c.getPA().movePlayer(3233, 9315, 0);
}
public void redostartfloor1(Client c) {
spawnDungNpc();
gameRoom.put(c, 1);
c.getPA().addSkillXP((300000), 23);
c.dungtokens += 5000;
for(int i = 0; i < startItems.length; i++) {
c.getItems().addItem(startItems[i], 1);
}
c.getPA().movePlayer(3233, 9315, 0);
}
when i change (c) to (this) it gives me a new error...
when i fix that error and i run the source the run.bat open give an error and close i cant post the error it's too fast.
this is what my memleak says:
Code:
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.NumberFormatException: For input string: "37 Dungeon
eering_Store 2 2 18349 1"
at java.lang.NumberFormatException.forInputString(NumberFormatException.
java:48)
at java.lang.Integer.parseInt(Integer.java:458)
at java.lang.Integer.parseInt(Integer.java:499)
at server.world.ShopHandler.loadShops(ShopHandler.java:140)
at server.world.ShopHandler.<init>(ShopHandler.java:45)
at server.Server.<clinit>(Server.java:64)
Could not find the main class: server.Server. Program will exit.