Sometimes using FOREACH with a TYPE generates this error, i.e. I have this code:
FOREACH bonus_item IN stage.bonus_items[]
NEXT
This generates an error TYPE is not declared, but if I change it to:
FOR i%=0 TO LEN(stage.bonus_items[])-1
NEXT
exactly in the same place of code, it works fine.
I think the problem is accessing other TYPEs members using FOREACH, but in GLBASIC v8 this worked fine. I mark the "others" because using within a type with something like:
FOREACH bonus IN self.bonus_items[]
NEXT
works fine too.
Can you post a reproduceable, small example?
I wonder if this is related to my problem:
http://www.glbasic.com/forum/index.php?topic=5933 (http://www.glbasic.com/forum/index.php?topic=5933)
Is your other TYPE defined in another file?
Or, it could just be a FOREACH bug!
Quote from: Kitty Hello on 2011-Mar-22
Can you post a reproduceable, small example?
Sorry for delay, here is.
[attachment deleted by admin]
OK, fixed in the next version.