View Single Post
  #2  
Old 02-08-2004, 08:09 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
um lets break down your script and see what you are doing
NPC Code:

timeout =.05;
if (timeout){


ok, you've told the npc to have a timeout ever .05 secs, and now we're looking at the code to be run every timeout...
NPC Code:

while (keydown2(87,true)){


Hmm, you're checking to see if the key is pressed (and making sure it is the right case, this is what the true is for), but why you are looping it with "while" I'll never know
NPC Code:

showimg 400,@Rank: (Error),190,150;
changeimgzoom 400,.80;
changeimgvis 400,5;
setplayerprop #c, Stat Screen;
}


showing text and setting player's chattext and then closing the while loop
NPC Code:

if (keydown2(87,false)){


checking to see if the key with keycode 87 is pressed but without checking if it is the right case,
NPC Code:

setplayerprop #c, Stat Screen Off;
hideimg 400;
}
}


setting player's chat and hiding your images, then closing all the open brackets

You need to learn to analyze your algorithms if you intend to not have problems like this anymore
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote