elf run1
October 24th, 2010, 03:11
this is a [PI] client
im trying to add a int to entitydef... here is my error
Java/EntityDef.java:19: incompatible types
found : java.lang.String[]
required: int
entityDef.actions = new String[5];
^
Java/EntityDef.java:20: array required, but int found
entityDef.actions[1] = "Attack";
^
Java/EntityDef.java:21: cannot find symbol
symbol : variable models
location: class EntityDef
entityDef.models = new int[1];
^
Java/EntityDef.java:22: cannot find symbol
symbol : variable models
location: class EntityDef
entityDef.models[0] = 44733;
^
Java/EntityDef.java:23: cannot find symbol
symbol : variable standAnim
location: class EntityDef
entityDef.standAnim = 10921;
^
Java/EntityDef.java:24: cannot find symbol
symbol : variable walkAnim
location: class EntityDef
entityDef.walkAnim = 10920;
^
Note: Java/Class36.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
6 errors
Press any key to continue . . .
and here is the coding i am trying to add.
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);
//try here
if(i == 1978) { // Change it.
entityDef.actions = new String[5];
entityDef.actions[1] = "Attack";
entityDef.models = new int[1];
entityDef.models[0] = 44733;
entityDef.standAnim = 10921;
entityDef.walkAnim = 10920;
entityDef.combatLevel = 450;
entityDef.name = "Tormented demon";
entityDef.description = "Lucien must be incredibly powerful if he can bind such demons to his will.".getBytes();
}
im not even sure ints in right place thats why i copied the method too..someone please help a.s.a.p.
im trying to add a int to entitydef... here is my error
Java/EntityDef.java:19: incompatible types
found : java.lang.String[]
required: int
entityDef.actions = new String[5];
^
Java/EntityDef.java:20: array required, but int found
entityDef.actions[1] = "Attack";
^
Java/EntityDef.java:21: cannot find symbol
symbol : variable models
location: class EntityDef
entityDef.models = new int[1];
^
Java/EntityDef.java:22: cannot find symbol
symbol : variable models
location: class EntityDef
entityDef.models[0] = 44733;
^
Java/EntityDef.java:23: cannot find symbol
symbol : variable standAnim
location: class EntityDef
entityDef.standAnim = 10921;
^
Java/EntityDef.java:24: cannot find symbol
symbol : variable walkAnim
location: class EntityDef
entityDef.walkAnim = 10920;
^
Note: Java/Class36.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
6 errors
Press any key to continue . . .
and here is the coding i am trying to add.
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);
//try here
if(i == 1978) { // Change it.
entityDef.actions = new String[5];
entityDef.actions[1] = "Attack";
entityDef.models = new int[1];
entityDef.models[0] = 44733;
entityDef.standAnim = 10921;
entityDef.walkAnim = 10920;
entityDef.combatLevel = 450;
entityDef.name = "Tormented demon";
entityDef.description = "Lucien must be incredibly powerful if he can bind such demons to his will.".getBytes();
}
im not even sure ints in right place thats why i copied the method too..someone please help a.s.a.p.