Post the case above that one. its likely that you missed out the break above.
|
I am trying to add nex Ints into EntityDef.java. This is the first time That I have tried addind a npc into a game. I added this code under "entitydef.readValues(stream);".
But when I try and Compile I get this error:case 13450:
entityDef.modelIDs = new int[1];
entityDef.modelIDs[0] = 62717;
entityDef.name = "Nex";
entityDef.aByte68 = 3;
entityDef.actions = new String[5];
entityDef.actions[1] = "Attack";
entityDef.aBoolean87 = true;
entityDef.combatLevel = 1001;
entityDef.aBoolean93 = true;
entityDef.anInt85 = 10;
entityDef.anInt92 = 50;
entityDef.anInt75 = 19;
entityDef.anInt79 = 32;
entityDef.aBoolean84 = true;
break;
Could someone please help me.
Thanks
Post the case above that one. its likely that you missed out the break above.
Thats that section. There was no other npcs added, this is the first 1 that is being added.public static EntityDef forID(int i)
{
for(int j = 0; j < 20; j++)
{
if(cache[j].interfaceType == (long)i)
{
return cache[j];
}
}
anInt56 = (anInt56 + 1) % 20;
EntityDef entitydef = cache[anInt56] = new EntityDef();
stream.currentOffset = streamIndices[i];
entitydef.interfaceType = i;
entitydef.readValues(stream);
case 13450:
entityDef.modelIDs = new int[1];
entityDef.modelIDs[0] = 62717;
entityDef.name = "Nex";
entityDef.aByte68 = 3;
entityDef.actions = new String[5];
entityDef.actions[1] = "Attack";
entityDef.aBoolean87 = true;
entityDef.combatLevel = 1001;
entityDef.aBoolean93 = true;
entityDef.anInt85 = 10;
entityDef.anInt92 = 50;
entityDef.anInt75 = 19;
entityDef.anInt79 = 32;
entityDef.aBoolean84 = true;
break;
return entitydef;
}
See this?
see the:Code:case 13450: entityDef.modelIDs = new int[1]; entityDef.modelIDs[0] = 62717; entityDef.name = "Nex"; entityDef.aByte68 = 3; entityDef.actions = new String[5]; entityDef.actions[1] = "Attack"; entityDef.aBoolean87 = true; entityDef.combatLevel = 1001; entityDef.aBoolean93 = true; entityDef.anInt85 = 10; entityDef.anInt92 = 50; entityDef.anInt75 = 19; entityDef.anInt79 = 32; entityDef.aBoolean84 = true; break; return entitydef;
break;
return entitydef;
get rid of the return entitydef;
y u no switch(i) {
Code:switch(i) { case 13450: entityDef.modelIDs = new int[1]; entityDef.modelIDs[0] = 62717; entityDef.name = "Nex"; entityDef.aByte68 = 3; entityDef.actions = new String[5]; entityDef.actions[1] = "Attack"; entityDef.aBoolean87 = true; entityDef.combatLevel = 1001; entityDef.aBoolean93 = true; entityDef.anInt85 = 10; entityDef.anInt92 = 50; entityDef.anInt75 = 19; entityDef.anInt79 = 32; entityDef.aBoolean84 = true; break; } return entitydef;
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |