G
-gone away-
Guest
Code: [Select]
Okay thats my current conversion code to convert from a byte array to a number. It works pretty well, squished it up a bit to take up less space in post.
However i encounter something very odd in one file in particular which hopefully someone will be able to give me an explanation for.
In file scene247, on the leg of emerald weapon, the stats for gil and exp come out at 4294967295 which is == to 256^4(power of) -1, in other words it comes out the max possible number that can go in this place. e.g.
Ap: 65535 - max number for bytes
Exp: 4294967295 - max number for bytes
Gil: 4294967295 - max number for bytes
Now whats got me weirded out is that if you open the same file with scenester or sceneedit you get the follow stats and i dont know why.
Ap: 65535
Exp: -1
Gil: -1
Are my values wrong or are they'rs? Im pretty sure mine are right, but i thought it best to check in case they are not. keep in mind that you never recieve these rewards in game because they are only on the leg.
Code:
String ^FileEditor::BinaryToNumber(array<Byte> ^data){ String ^strTmp; double dblTmp; for (double i=0 ; i < data->GetLength(0) ; i++ ) { if (i == 0) { dblTmp = dblTmp + data[i]; } else { dblTmp = dblTmp + (data[i] * (pow(256,i)));} } return strTmp = dblTmp.ToString();}
Okay thats my current conversion code to convert from a byte array to a number. It works pretty well, squished it up a bit to take up less space in post.
However i encounter something very odd in one file in particular which hopefully someone will be able to give me an explanation for.
In file scene247, on the leg of emerald weapon, the stats for gil and exp come out at 4294967295 which is == to 256^4(power of) -1, in other words it comes out the max possible number that can go in this place. e.g.
Ap: 65535 - max number for bytes
Exp: 4294967295 - max number for bytes
Gil: 4294967295 - max number for bytes
Now whats got me weirded out is that if you open the same file with scenester or sceneedit you get the follow stats and i dont know why.
Ap: 65535
Exp: -1
Gil: -1
Are my values wrong or are they'rs? Im pretty sure mine are right, but i thought it best to check in case they are not. keep in mind that you never recieve these rewards in game because they are only on the leg.