Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-08-2002, 12:33 PM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Unhappy Endless loop...

NPC Code:

if (timeout&&this.loop=2){
if (this.key5=true){
this.hits+=1;
showimg 0,@@c@SUCCESSFUL,screenwidth/2,screenheight/1-10;
changeimgvis 0,4;
this.key1=false;
this.key2=false;
this.key3=false;
this.key4=false;
this.key5=false;
displaycraft();
sleep 2;
this.loop=1;
timeout=1;
}
else{
showimg 0,@@c@FAILED,screenwidth/2,screenheight/1-10;
changeimgvis 0,4;
this.key1=false;
this.key2=false;
this.key3=false;
this.key4=false;
this.key5=false;
displaycraft();
this.loop=1;
timeout=1;
}
}



For some reason, even though this.loop=1, the timeout still continues to execute the script .
__________________
  #2  
Old 12-08-2002, 01:27 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
== instead of just the single = in the if conditions. = is an asignment statement, == is a comparison statement, dont get them mixed up.

Thats just looking at it at a glance, If there is anything else wrong though it would be in the body of the script.
__________________

subliminal message: 1+1=3
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.