Need Help
i try to added some dragon attack us with gfx.And it give me this error.
Code:
public void loadSpell(int i) {
switch(npcs[i].npcType) {
case 50://KBD
int random = Misc.random(4);
if (random == 0) {
npcs[i].projectileId = 393; //red
npcs[i].endGfx = 430;
npcs[i].attackType = 3;
} else if (random == 1) {
npcs[i].projectileId = 394; //green
npcs[i].endGfx = 429;
npcs[i].attackType = 3;
} else if (random == 2) {
npcs[i].projectileId = 395; //white
npcs[i].endGfx = 431;
npcs[i].attackType = 3;
} else if (random == 3) {
npcs[i].projectileId = 396; //blue
npcs[i].endGfx = 428;
npcs[i].attackType = 3;
} else if (random == 4) {
npcs[i].projectileId = -1; //melee
npcs[i].endGfx = -1;
npcs[i].attackType = 0;
}
break;
case 53://Red Dragon
case 941://Green Dragon
case 55:// Blue Dragon
case 1590://Bronze Dragon
case 1591://Iron Dragon
case 1592:// Steal Dragon
int random = Misc.random(2);
if (random == 0) {
npcs[i].projectileId = 393; //red
npcs[i].endGfx = 430;
npcs[i].attackType = 3;
} else if (random == 1) {
npcs[i].projectileId = -1; //melee
npcs[i].endGfx = -1;
npcs[i].attackType = 0;
}
break;
Error.
Code:
src\server\model\npcs\NPCHandler.java:1844: random is already defined in loadSpe
ll(int)
int random = Misc.random(2);
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Press any key to continue . . .
Some Command Request Base On Project Insanity.