i believe it should be in actionhandler.java
|
Hey guys, this is going to sound noob as hell but how the hell do I add this?
I know it goes in clicking buttons but I get these errorsCode:case 121129: if(c.playerRights == 4) c.getShops().openShop(19); } else { if(c.playerRights == 0) c.sendMessage("<img=0>You must be a Donator to do this"); break;
I normally can fix these but its been ages since I have done a case like this ><Code:src\server\model\players\packets\ClickingButtons.java:3137: 'else' without 'if' } else { ^ src\server\model\players\packets\ClickingButtons.java:3142: orphaned case case 121133: ^ 2 errors Press any key to continue . . .
If someone can fix up my code that would be great, thanks!
But its a button case, I'm using an interface to open up the shop
Try that
Code:case 121129: if(c.playerRights == 4) c.getShops().openShop(19); } else { c.sendMessage("<img=0>You must be a Donator to do this"); break;
Neither of them worked, lol
EDIT:haha, I'm such a noob xD I fixed it
Thanks guys for trying to helpCode:case 121129: if(c.playerRights == 4) { c.getShops().openShop(19); } else { //if (c.playerRights == 0) c.sendMessage("<img=0>You must be a Regular Donator to do this"); } break;
Weird, it worked on my server perfectly, try this one?
Code:case 121129: if(c.playerRights == 4) c.getShops().openShop(19); } else if { c.sendMessage("<img=0>You must be a Donator to do this"); } break;
You should try using } else if { instead of } else {
It is a more efficient way of doing it.
Ijordan, what the fuck are you talking about?
} else { basically means, if the first condition isn't true then just do this. } else if (x) { means if the first condition isnt true, check if this condition is true, etc.
also else if statements always require a condition (} else if (c.playerName.equalsIgnoreCase("ijordan")) { for example)
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |