Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Help with tokenize (https://forums.graalonline.com/forums/showthread.php?t=9038)

mystic_pheonix 08-07-2001 02:30 AM

Help with tokenize
 
can someone tell me whats wrong with this?

if (playertouchsme) {
toweapons Warper;
}
if (playerchats) {
if(startswith(warpto,#c)) {
tokenize #c;
setlevel2 #t(3).graal,#t(1),#t(2);
}
}

it keeps comming up with errors :(

Poogle 08-07-2001 02:48 AM

try isweapon before all of that beside the toweapon and touch me

Poogle 08-07-2001 02:49 AM

BTW nice idea ;)

mystic_pheonix 08-07-2001 02:51 AM

the #t(2) is the error, but why?

zokemon 08-07-2001 02:53 AM

try this:
NPC Code:
if (playertouchsme) { 
toweapons Warper;
}
if (playerchats) {
if(startswith(warpto,#c)) {
setlevel #e(7,-1,#c).graal;
}
else if(startswith(setx,#c)) {
playerx=strtofloat(#e(5,-1,#c));
}
else if(startswith(sety,#c)) {
playery=strtofloat(#e(5,-1,#c));
}
}



Falcor 08-07-2001 02:55 AM

toekns are string-bassed

try

setlevel2 #t(3).graal,strtofloat(#t(1)),strtofloat(#t(2));

mystic_pheonix 08-07-2001 02:55 AM

i dont want to have to say setx and sety

zokemon 08-07-2001 02:58 AM

Quote:

Originally posted by mystic_pheonix
i dont want to have to say setx and sety
oh well it sucks for you then

mystic_pheonix 08-07-2001 03:00 AM

thx falcor! :)


All times are GMT +2. The time now is 06:30 PM.

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