PDA

View Full Version : [2.50.2] SizeOfArray() does not work on ffc, item, weapon, itemdata types. Also Trace() on these typ



ZoriaRPG
12-23-2015, 04:47 PM
Probably not a bug, but not consistent. SizeOfArray() doe snot work on types other than int, and float. While it's not practical to get it to work on bool types (although this is possible. it should work on the following types: ffc, lweapon, eweapon, item, itemdata.

I can probably come up with code for making it work on bool types too.

Furthermore, there is no Trace() function for these types. That should return their pointer.

Boolean Arrays

It's actually evident that the size of boolean arrays is preserved in ZScript/ZASM, unlike in C, as the console will list their size when trying to read beyond it. Can't we just fix SizeOfArray to read that value for bool types?