Endif Expected ?

Blitz3D Forums/Blitz3D Beginners Area/Endif Expected ?

Gfk, yea, that is the way I had it to begin with, before I started getting the wierd errors, about the endif or when it was the way you have it, I was getting expecting next error message.

I think, that Visual Blitz, Blitz3D needs to have better debugging help, such as these types of situations, would be much better if it said, variable used before dimensioned. or Attempted usage of an undefined variable, I don't know how hard it would be to put this debugging in, but it desperately needs it, I have realized here lately just how hard it is to debug a program with 1000's of lines of code in it, even with debug mode turned on.

Maybe I need to put some kind of object checking code in my code, to make sure each array / variable I am using is initialized before allowing it to be used, and if it is not throw a runtime error with the message variable not initialized <variable name> or something

Any ideas, how to do this ? Especially with Image handles returned from the nSprite lib functions like LoadImage and ns_LoadAnimImage or nS_CopyImage functions.

Thanks for all your help guys, as I am pulling my hair out all weekend over this, I learned a valuable lesson about coding a little, error checking, code a little more, error check etc.. as I go along. Because when I code 3 or more functions, then try to find the bugs, I was losing my mind, and smoking far more often then I should.

Thanks,

Ken