Thread: scripts bish
View Single Post
  #3  
Old 09-28-2002, 07:57 AM
R0b1n-NPC R0b1n-NPC is offline
Registered User
Join Date: Sep 2002
Posts: 397
R0b1n-NPC is on a distinguished road
You should be able to set a flag that makes the editor go into ***** mode such as

//#editor.option-explicit

then it would do this if you had a script such as:
NPC Code:

//#editor.option-explicit
if (created) {
this.num = 5;
this.light = 0.5;
this.blah = 30;
for (this.i=0;this.i<this.num;this.i++) {
showimg this.bah+this.i,light2.png,x+this.i,y+this.i;
changeimgcolors this.bah+this.i,this.light,0,0,0.99;
}
}


ERROR: Undefined Variable: this.bah

Notice the spelling mistake of this.blah to this.bah.

And the editor would see that this.bah isnt set to anything, and unlike before it just sets it to 0, it would bring an error.
__________________
- R0bin
Reply With Quote