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 02-11-2004, 04:30 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
commas in strings

Well, I'm rescripting the chat system for my server. Hehe.

Basically, it stores your chat text in a string, then sends to everyone else to display on screen. However, everything after a comma, it doesn't show.

I tried quoting " " the whole string, basically its just
NPC Code:

setstring this.chat,"#p(1)";



That does not work. I even used a for loop to go through the whole #Is and even set them into a another string. (Yes, this would get rid of the commas, oh well.)

Any suggestions?
__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.
Reply With Quote
  #2  
Old 02-11-2004, 04:33 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Where did you get the #p(1) from
Reply With Quote
  #3  
Old 02-11-2004, 04:43 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
I'm originally triggering from the clientside. Sorry probably left that out.
__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.
Reply With Quote
  #4  
Old 02-11-2004, 06:42 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Show me the triggeraction part
Reply With Quote
  #5  
Old 02-11-2004, 09:33 AM
Termina_Owner Termina_Owner is offline
Registered User
Join Date: Oct 2003
Posts: 175
Termina_Owner is on a distinguished road
I found a bypass to that...

NPC Code:

if (actionserverside){
sendpm #p(0);
}
//#CLIENTSIDE
if (playerchats){
setstring message,;
addstring message,#c;
triggeraction 0,0,serverside,#s(message),;
}



Addstrings would make the "'s and the ,'s stay. It works magic ;P
__________________
- Rance Vicious
Reply With Quote
  #6  
Old 02-12-2004, 12:00 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
Rance, I'm not using sendpm...but that also might work. I'll try it.

Jagen, here's the triggeraction.

NPC Code:

iif (playerchats){
setstring this.chat,#c;
setplayerprop #c,;
triggeraction 0,0,serverside,-Chat,chat,#s(this.chat);
setstring this.chat,;
}



Of course, this is clientside. Would I have to quote it clientside?
__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.
Reply With Quote
  #7  
Old 02-12-2004, 03:48 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Duwul
Rance, I'm not using sendpm...but that also might work. I'll try it.

Jagen, here's the triggeraction.

NPC Code:

iif (playerchats){
setstring this.chat,#c;
setplayerprop #c,;
triggeraction 0,0,serverside,-Chat,chat,#s(this.chat);
setstring this.chat,;
}



Of course, this is clientside. Would I have to quote it clientside?
The string handling isn't any different... make the param
"#s(this.chat)"
Reply With Quote
  #8  
Old 02-12-2004, 04:45 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
I thought so. However, Rance's method worked. I guess I'll just be using that. =P
Thanks for your help.
__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.
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 10:12 PM.


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