Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-23-2004, 01:36 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
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?
__________________
Reply With Quote
  #2  
Old 03-23-2004, 02:30 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Use a string array/list instead of a string of tokenizable tokens? :P
Reply With Quote
  #3  
Old 03-23-2004, 02:35 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
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.
__________________
Reply With Quote
  #4  
Old 03-23-2004, 02:41 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Nobody knows what happens when a string gets send over a triggeraction Send everything as seperate parameters?
Reply With Quote
  #5  
Old 03-23-2004, 02:46 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
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
__________________
Reply With Quote
  #6  
Old 03-23-2004, 05:33 AM
wonderboysp2p wonderboysp2p is offline
Registered User
wonderboysp2p's Avatar
Join Date: Sep 2002
Location: -Wonderboy
Posts: 537
wonderboysp2p is on a distinguished road
Send a message via AIM to 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)
__________________

we are the llama FORUms!!!EWQ Ce13d5423f23!! 2e1 @$6tgv3uy65!
Reply With Quote
  #7  
Old 03-23-2004, 05:37 AM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
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
__________________
Reply With Quote
  #8  
Old 03-23-2004, 05:29 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Perhaps you could try using addstring to wrap the string in some triggerable way :/
Reply With Quote
  #9  
Old 03-23-2004, 05:49 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
Yeah i suggested that to him already
Reply With Quote
  #10  
Old 03-23-2004, 08:32 PM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
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.
__________________
Reply With Quote
Reply


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 05:22 PM.


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