Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   setting strings (https://forums.graalonline.com/forums/showthread.php?t=51890)

Andy0687 03-23-2004 01:36 AM

setting strings
 
Ok i know the general idea of setting strings, but im having a problem with adding this new item to my gui ive made, it works when added all the strings by RC but now i made an item so that it will record all the stats from a buy npc.

anyways this is the part im having the trouble with

NPC Code:

setstring client.temp,"Fishing Rod" "Fishing" "" "" "Rod Used for Fishing" "" "" "No Resale";
for (i=1;i<10;i++) {
if (strequals(#s(clientr.item#v(i)), )) {
triggeraction 0,0,serverset,item#v(i),#s(client.temp);
break;
}
}



in the npcserver i have a place for setting the string and it works well with everything else, except this.

Even when i put #s(client.temp) in Quotes like "#s(client.temp)" it wont send, it only sends Fishing and Rod to the string.

Any help?

Loriel 03-23-2004 02:30 AM

Use a string array/list instead of a string of tokenizable tokens? :P

Andy0687 03-23-2004 02:35 AM

Quote:

Originally posted by Loriel
Use a string array/list instead of a string of tokenizable tokens? :P
Although that dosent solve my problem :)

I was going to, but the way the system was designed at first had supported this method, mabye later i will rescript it but i would like to get this working first.

Loriel 03-23-2004 02:41 AM

Nobody knows what happens when a string gets send over a triggeraction :( Send everything as seperate parameters?

Andy0687 03-23-2004 02:46 AM

Quote:

Originally posted by Loriel
Nobody knows what happens when a string gets send over a triggeraction :( Send everything as seperate parameters?
Thats why i had encased the param entirety in quotes, i had hoped it would send the entire string as one param.
Apparently i was wrong :\

Edit:

I had done this too with reassurance from something that Jagen had helped some kid with where sending the string encased in Quotes fixed the problem of it only sending a portion of the string

wonderboysp2p 03-23-2004 05:33 AM

Me: excuse NPC Server... why are you such an ass about strings?
(NPC sends my text as a string to the NPC server)
NPC Server sees "NPC Server are suc an ass string"
NPC Server : IM ANGRY
*NPC Server Commits suicide*


(seperate paramaters = solution)

Andy0687 03-23-2004 05:37 AM

Quote:

Originally posted by wonderboysp2p
Me: excuse NPC Server... why are you such an ass about strings?
(NPC sends my text as a string to the NPC server)
NPC Server sees "NPC Server are suc an ass string"
NPC Server : IM ANGRY
*NPC Server Commits suicide*


(seperate paramaters = solution)

***** thanks, I had got that from Loriel too and have went about getting ready to do it.

Although that very amusing little story there, was perfect :)

Loriel 03-23-2004 05:29 PM

Perhaps you could try using addstring to wrap the string in some triggerable way :/

R0bin 03-23-2004 05:49 PM

Yeah i suggested that to him already :)

Andy0687 03-23-2004 08:32 PM

Quote:

Originally posted by Loriel
Perhaps you could try using addstring to wrap the string in some triggerable way :/
Yeah r0bin already suggested this to me as well, im not able to start working on it now, but i will come back later with the solution i used.


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

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