You can share the fraudulent tool check with the item!
Which version of item_table are you trying to read? Seems there is a mismatch between the size of objects. Try to sum up some of the stuff - size field should be equal to the sum of bytes read in this loop. E.g. if in the first iteration you get size = 10, it means the Weapon structure should be 10 bytes big. I know there were issues with Books before, I had to hardcode this one value. Structures change every now and then, not sure if we can handle versioning anyhow the other way than just recompiling or just loading N bytes (determined by the size) and just populating the data as-is.Quote:
[Only registered and activated users can see links. Click Here To Register...]
can some1 help me to fix this
can someone help me? i got error code at maxIndex
An unhandled exception of type 'System.IndexOutOfRangeException' occurred in ItemTableReader.exe
BinaryReader br = new BinaryReader(s);
toolName = br.ReadBytes(48);
version1 = br.ReadInt16();
version2 = br.ReadInt16();
updateTime.Load(s);
userName = br.ReadBytes(16);
comName = br.ReadBytes(20);
int cont = BOOL.TRUE; //continue
sbyte type;
uint size; //why sbyte tho
short count;
short maxIndex;
int cnt = 0;
int tmpCnt = 0;
string tst = "";
do
{
cnt = 0;
type = br.ReadSByte();
size = br.ReadUInt32();
count = br.ReadInt16();
maxIndex = br.ReadInt16();
MaxItemCount[type] = maxIndex; <===== i got error right here
ItemType itemType = (ItemType)type;
byte[] arr = null;
tst += string.Format("{0}: \t{1}\n", itemType, size);
switch (itemType)
It was written years ago, within few hours, so don't expect too much from it - literally hardcoded structures with a bunch of forms and controls thrown together so I don't have to change it on a binary level. At this point, I'd definitely go for the config.Quote:
Maybe the tool should have configurable parameters for the bytesize (and for any dynamically changing values for that matter). Easiest way some external xml file with conf values in it.
[Only registered and activated users can see links. Click Here To Register...]Quote:
Cần t́m anh em nào có tool chia sẽ cách sử dung
[Only registered and activated users can see links. Click Here To Register...]
I prefer the 010 editor templates, where a mass update can be done via selection filters. The apps to edit the tables were the first quick fix created by @[Only registered and activated users can see links. Click Here To Register...]. It was this guy, who got the ball rolling in this area. Ofc @[Only registered and activated users can see links. Click Here To Register...] was creative by, finding all of the table structures in ndserver source. You did a good job there. You deserve the credit, for all this.Quote:
[Only registered and activated users can see links. Click Here To Register...]