Page 1 of 1

No error message when dereferencing fails

Posted: 05 Jul 2006, 19:01
by NateDog
i know there can be problems with nested deferencing of objects/arrays but this one was particularly nasty to debug ....

Code: Select all

u.freezer[dnaIndex].qty--;
gave no error but just wouldn't load the extension.

switched to the following and all is well:

Code: Select all

var q = u.freezer[dna1Index].qty;
q--;
the real problem is just the complete lack of error message when trying to load the extension so made identifying/correcting a bit tedious...