1)When i set up a simple if statement with a pointer value to be checked, it returns false even though it's true. Yet when I put in the equivalent decimal value for it, it returns true and runs this script. Is this a bug of some kind?
- Code: Select all
extern LONG newarmcode[1] = { "", 0x00b118};
extern LONG oldarmcode[1] = { "", 0x167934};
//this works
if (oldarmcode[7] == -1400766460) {newcode = 1;}
//this doesn't
if (oldarmcode[7] == 0xA4820006) {newcode = 1;}
//this fails too of course
if (oldarmcode[7] == 0x060082A4) {newcode = 1;}
2)When using a script involving a LONG type var, when I set it to write in the value of -2,147,483,648 , it would instead write in -2,147,483,647. According to your documentation the limit for a long is -2,147,483,648 . Why does this happen? Yet if I tell it to --1 from the value if it is -2147483647, it will set it to -2147483648 like it should be.
3) When using #include to link to a text file with code, I noticed that just editing the txt file, and resaving it wasn't enough to update my scripts. It seems that I also have to compile it in the code editor, and then reopen the locked value with the script in it, copy and paste the same script info in (since only the info in the txt has changed) and then hit ok to get it to work. And sometimes this seems to possibly fail too, so I just take the info out of the txt and paste it into the code file itself and it works fine. What am I doing wrong?