Code:
public static ItemDef forID(int i) {
for(int j = 0; j < 10; j++)
if(cache[j].id == i)
return cache[j];
cacheIndex = (cacheIndex + 1) % 10;
ItemDef itemDef = cache[cacheIndex];
stream.currentOffset = streamIndices[i];
itemDef.id = i;
itemDef.setDefaults();
itemDef.readValues(stream);
ItemDef_2.Items(i);
/* Customs added here? */
case 15084:
itemDef.actions = new String[5];
itemDef.actions[0] = "Roll";
itemDef.modelID = 7509;
itemDef.modelZoom = 760;
itemDef.modelRotation1 = 0;
itemDef.modelRotation2 = 0;
itemDef.modelOffset1 = 0;
itemDef.modelOffset2 = 0;
itemDef.name = "Dice bag";
itemDef.description = "@red@!!!WARNING!!!@bla@ VERY ADDICTIVE!".getBytes();
break;
if(itemDef.certTemplateID != -1)
itemDef.toNote();
if(!isMembers && itemDef.membersObject) {
itemDef.name = "Members Object";
itemDef.description = "Login to a members' server to use this object.".getBytes();
itemDef.groundActions = null;
itemDef.itemActions = null;
itemDef.team = 0;
}
return itemDef;
}
When i add
Code:
case 15084:
itemDef.actions = new String[5];
itemDef.actions[0] = "Roll";
itemDef.modelID = 7509;
itemDef.modelZoom = 760;
itemDef.modelRotation1 = 0;
itemDef.modelRotation2 = 0;
itemDef.modelOffset1 = 0;
itemDef.modelOffset2 = 0;
itemDef.name = "Dice bag";
itemDef.description = "@red@!!!WARNING!!!@bla@ VERY ADDICTIVE!".getBytes();
break;
i get : error orphaned case
case: 15084
cant figure out whats wrong :/
thats the only custom in there also, there is no other case: 15084
heres my item def
Can anyone see anything wrong?