[EDIT] FORGET IT! I forgot to call NEW TCollideObject on each one, sorry to waste your time (I'll get my coat). I was running with debug mode turned off and it didn't complain about the null objects.
Check it out:
Strict
Type TCollideObject
Field Value%
End Type
Global CollideObjects:TCollideObject[10]
Global Ints[10]
For Local i=0 To 9
CollideObjects[i].Value=i
Ints[i]=i
Print "i="+i
Next
For Local i=0 To 9
Print "objects="+CollideObjects[i].Value
Print "ints ="+ints[i]
Next
The results should be self explanatory, but basically when i is assigned to the object Value field it is always 9! The max value from the loop. Yet when assigned to the int array (and when printed) it's correct.
This has gotta be a bug right? If you agree I'll post it in the bug forum.
Done in BMax 1.24 fully synced.
|