you have an extra bracket somewhere most likely.
|
you have an extra bracket somewhere most likely.
Orphaned cases are cases which lie outside of a switch statement.
Such as:
Code:switch(proper) { case 0: //data break; case 1: //data. break; }In the inproper switch statement, case 1 would be printed as an orphaned case, whilst compiling.Code:switch(inproper) { case 0: //data break; } case 1: //data. break;
Post your whole BANKX1 class, please.
sspackage server.model.players.packets;
import server.model.players.Client;
import server.model.players.PacketType;
/**
* Bank X Items
**/
public class BankX1 implements PacketType {
public static final int PART1 = 135;
public static final int PART2 = 208;
public int XremoveSlot, XinterfaceID, XremoveID, Xamount;
@Override
public void processPacket(Client c, int packetType, int packetSize) {
if (packetType == 135) {
c.xRemoveSlot = c.getInStream().readSignedWordBigEndian();
c.xInterfaceId = c.getInStream().readUnsignedWordA();
c.xRemoveId = c.getInStream().readSignedWordBigEndian();
}
if (c.xInterfaceId == 3900) {
if (c.myShopId == 30 && c.memberStatus < 1) {
c.sendMessage("You must be a donator to buy from this shop.");
return;
}
case 608:
if (c.myShopId == 39 && c.memberStatus < 2) {
c.sendMessage("You must be a Super donator to buy from this shop.");
return;
}
case 619:
if (c.myShopId == 40 && c.memberStatus < 2) {
c.sendMessage("You must be a Super donator to buy from this shop.");
return;
}
c.getShops().buyItem(c.xRemoveId, c.xRemoveSlot, 100);//buy 20
c.xRemoveSlot = 0;
c.xInterfaceId = 0;
c.xRemoveId = 0;
return;
}
if(packetType == PART1) {
synchronized(c) {
c.getOutStream().createFrame(27);
}
}
}
}
Remove the space in the red.Code:package server.model.players.packets; import server.model.players.Client; import server.model.players.PacketType; public class BankX1 implements PacketType { public static final int PART1 = 135; public static final int PART2 = 208; public int XremoveSlot, XinterfaceID, XremoveID, Xamount; @Override public void processPacket(Client c, int packetType, int packetSize) { if (packetType == 135) { c.xRemoveSlot = c.getInStream().readSignedWordBigEndian(); c.xInterfaceId = c.getInStream().readUnsignedWordA(); c.xRemoveId = c.getInStream().readSignedWordBigEndian(); } if (c.xInterfaceId == 3900) { if (c.myShopId == 30 && c.memberStatus < 1) { c.sendMessage("You must be a donator to buy from this shop."); return; } if (c.myShopId == 39 && c.memberStatus < 2) { c.sendMessage("You must be a Super donator to buy from this shop."); return; } if (c.myShopId == 40 && c.memberStatus < 2) { c.sendMessage("You must be a Super donator to buy from this shop."); return; } c.getShops().buyItem(c.xRemoveId, c.xRemoveSlot, 100);//buy 20 c.xRemoveSlot = 0; c.xInterfaceId = 0; c.xRemoveId = 0; return; } if(packetType == PART1) { synchronized(c ) { c.getOutStream().createFrame(27); } } } }
lol nvmmm
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |