What is wrong with this?

BlitzMax Forums/BlitzMax Programming/What is wrong with this?

Brucey(Posted 2005) [#1]
I have this little piece of code which should loop through a TMap object :

    For gad:TGadget = EachIn gmap.Values()
        FreeGadget(gad)
    Next


I get an error while building : Identifier 'gad' not found.
(I'm using superstrict mode)

This should work, right?

:-(


Diablo(Posted 2005) [#2]
if your using strict you will need to:

for local gad:TGadget = eachin gmap.values()

and all ways to a null check as well


Brucey(Posted 2005) [#3]
heh... Duh!!

Thanks... :-D

...must have spent too long in front of the keyboard today...