Struct - Type2
Posted: Tue May 15, 2012 9:00 pm
Was finally able to get this working, mostly. For what ever reason type2 is always returning a value of 205 no matter what the struct is set at, I wasn't able to track down the cause of this so in the code I just submitted the value is hardcoded to DATA_STRUCT_SINT16, I know this is bad but seeing as the only struct that uses Type2 as of now is items I went ahead and did this so that items display correctly while the cause of this issue is tracked down.
Also it is important to note that the type that takes the most bytes needs to be in Type, in the case of items Type="float" (4 bytes) Type2="sint16" (2 bytes) if they are reversed world will produce a windows popup (like a crash would) saying that the heap is corrupted (memory was written outside of the allocation) or something like that.
Also it is important to note that the type that takes the most bytes needs to be in Type, in the case of items Type="float" (4 bytes) Type2="sint16" (2 bytes) if they are reversed world will produce a windows popup (like a crash would) saying that the heap is corrupted (memory was written outside of the allocation) or something like that.