Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Some help.. (https://forums.graalonline.com/forums/showthread.php?t=44118)

VeX_RaT_Boy 04-08-2003 11:11 PM

Some help..
 
Hey, i am making a script that uses for with tokenizecount, and i have some trouble with it

NPC Code:

for (i=0;tokenizecount;i++) {
showimg 300+i,#t(i)_diamonds.png,75,this.compcardpos[i];
message #v(this.compcardpos[i]);
sleep 1;
}




Anyone see anything wrong? also, the message and sleep part is just for testing.

Python523 04-08-2003 11:19 PM

tokenscount

VeX_RaT_Boy 04-08-2003 11:26 PM

ummm....graal froze...i have it inside a 0.05 timeout. is that the problem now?

NPC Code:
    for (i=0;tokenscount;i++) {
showimg 300+i,#t(i)_diamonds.png,75,this.compcardpos[i];
}


PrinceDark 04-09-2003 01:56 AM

If the middle part is not true then the script will not run. I believe what you need to change is the middle part to "i<tokenscount". Simply putting tokenscount; right there is not going to work.

VeX_RaT_Boy 04-09-2003 05:35 PM

Thank you, it works now ;)

i<tokenscount did the think :)


All times are GMT +2. The time now is 06:12 AM.

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