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-28-2004, 04:23 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
White space after string

Im makin a script where letters show on screen soon as u type. if
if (keypressed){
if (strequals(#p(0),32)){
setstring client.happy,#s(client.happy) ;
}
}

the space doesn't add at teh end =\
help?

How do I add a whitespace after a string.
Reply With Quote
  #2  
Old 02-28-2004, 04:28 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
I don't think you can, if you want you can use "s
__________________
Reply With Quote
  #3  
Old 02-28-2004, 11:02 AM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Re: White space after string

Quote:
Originally posted by Gman4pwnu
Im makin a script where letters show on screen soon as u type. if
if (keypressed){
if (strequals(#p(0),32)){
setstring client.happy,#s(client.happy) ;
}
}

the space doesn't add at teh end =\
help?

How do I add a whitespace after a string.
To add onto a string you add a comma':
setstring this.wan,dfdg,dgsdg,sdgsdg,dsgg;
But i'm sure you knew that..
__________________
V$:CONFL16T
Reply With Quote
  #4  
Old 02-28-2004, 01:26 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
Re: White space after string

Quote:
Originally posted by Gman4pwnu
Im makin a script where letters show on screen soon as u type. if
if (keypressed){
if (strequals(#p(0),32)){
setstring client.happy,#s(client.happy) ;
}
}

the space doesn't add at teh end =\
help?

How do I add a whitespace after a string.
setstring client.happy,#s(client.happy)#K(32);
__________________
-Kjetil Valen
Reply With Quote
  #5  
Old 02-28-2004, 02:05 PM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
Re: Re: White space after string

Quote:
Originally posted by VeX_RaT_Boy
setstring client.happy,#s(client.happy)#K(32);
It'll save it with that space there, but if you attempt to write anything after the space, it goes bye bye.
__________________
Kat
Reply With Quote
  #6  
Old 02-28-2004, 02:17 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
Re: Re: Re: White space after string

Quote:
Originally posted by -Ramirez-

It'll save it with that space there, but if you attempt to write anything after the space, it goes bye bye.
Doesn't happen to me.
__________________
-Kjetil Valen
Reply With Quote
  #7  
Old 02-28-2004, 09:09 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Re: Re: White space after string

Quote:
Originally posted by WanDaMan

To add onto a string you add a comma':
setstring this.wan,dfdg,dgsdg,sdgsdg,dsgg;
But i'm sure you knew that..
Um not really you don't have to use commas....
and o ya #K(32) works
__________________
Reply With Quote
  #8  
Old 02-28-2004, 09:47 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Re: Re: Re: White space after string

Quote:
Originally posted by ZeLpH_MyStiK

Um not really you don't have to use commas....
and o ya #K(32) works
You don't?
Wow haha
setstring this.leet, this is so leet i will die soon;
__________________
V$:CONFL16T
Reply With Quote
  #9  
Old 02-29-2004, 05:59 AM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
Re: Re: Re: Re: White space after string

Quote:
Originally posted by VeX_RaT_Boy
Doesn't happen to me.
When I actually tested it by playing the level, it didn't for me either. What I did the first time was just create a blank level, place an NPC in it, remove the default, ANNOYING text, and put in "setstring test,test#K(32);". I clicked "Close". Graal runs through the NPC before you even play the level... and the flag was set. It had "test " set. (With the space at the end.) Then I modified the NPC and put "setstring test,#s(test)test;" in place of the previous setstring line. I closed the NPC again, checked the flag... it now said "testtest". The space was removed. Weird how it would do that there, but not when actually playing the level.
__________________
Kat
Reply With Quote
  #10  
Old 02-29-2004, 11:59 AM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
Re: Re: Re: Re: Re: White space after string

Quote:
Originally posted by -Ramirez-

When I actually tested it by playing the level, it didn't for me either. What I did the first time was just create a blank level, place an NPC in it, remove the default, ANNOYING text, and put in "setstring test,test#K(32);". I clicked "Close". Graal runs through the NPC before you even play the level... and the flag was set. It had "test " set. (With the space at the end.) Then I modified the NPC and put "setstring test,#s(test)test;" in place of the previous setstring line. I closed the NPC again, checked the flag... it now said "testtest". The space was removed. Weird how it would do that there, but not when actually playing the level.
I guess it must be a bug
__________________
-Kjetil Valen
Reply With Quote
  #11  
Old 02-29-2004, 04:58 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Re: Re: Re: Re: White space after string

Quote:
Originally posted by WanDaMan

You don't?
Wow haha
setstring this.leet, this is so leet i will die soon;
I think you're refering to addstring? But that's not what we're talking about here =\
__________________
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:01 AM.


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