Because you're defining the scope of the variable to that section of code, not the entire function or whatever you think the scope is. In this case, I would imagine, it's local to within that If..EndIf you've shown above. Every time program execution goes out of that If..EndIf section, the variable goes out of scope and is gone. Then when you come back in again, it's recreated.
local help
BlitzMax Forums/BlitzMax Beginners Area/local helpThe forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.