I get this error when compiling:
Code:
client.java:25044: 'else' without 'if'
else if((itemUsed == 227 && useWith == 221)) { // vow with eye of newt
^
1 error
Press any key to continue . . .
and this is my code:
Code:
public boolean CheckForSkillUse() { // Use Item On Item
else if((itemUsed == 227 && useWith == 221)) { // vow with eye of newt
sM("You make an attack potion.");
deleteItem(221, getItemSlot(221), 1);
addItem(2428, 1); // attack pot
addSkillXP((500*playerLevel[17]), 17);
}
if((itemUsed == 227 && useWith == 225)) { // vow with limpwurt
sM("You make a strength potion.");
deleteItem(225, getItemSlot(225), 1);
addItem(113, 1); // str pot
addSkillXP((950*playerLevel[17]), 17);
}
if((itemUsed == 227 && useWith == 1951)) { // vow with redberries
sM("You make a defense potion.");
deleteItem(1951, getItemSlot(1951), 1);
addItem(2440, 1); // def pot
addSkillXP((1350*playerLevel[17]), 17);
}
if((itemUsed == 227 && useWith == 239)) { // vow with whiteberries
sM("You make a super attack potion.");
deleteItem(239, getItemSlot(239), 1);
addItem(2436, 1); // super att pot
addSkillXP((3500*playerLevel[17]), 17);
}
if((itemUsed == 227 && useWith == 3369)) { // vow with thin snail meat
sM("You make a super strength potion.");
deleteItem(3369, getItemSlot(3369), 1);
addItem(2440, 1); // super str pot
addSkillXP((6000*playerLevel[17]), 17);
}
if((itemUsed == 227 && useWith == 4674)) { // vow with gilded cross
sM("You make a Prayer Restore potion.");
deleteItem(4674, getItemSlot(4674), 1);
addItem(2434, 1); // pray pot
addSkillXP((10000*playerLevel[17]), 17);
}
I couldn't find anything wrong with it.. help please?