Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   White space after string (https://forums.graalonline.com/forums/showthread.php?t=51378)

Gman4pwnu 02-28-2004 04:23 AM

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.

ZeLpH_MyStiK 02-28-2004 04:28 AM

I don't think you can, if you want you can use "s

WanDaMan 02-28-2004 11:02 AM

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.. ;)

VeX_RaT_Boy 02-28-2004 01:26 PM

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);

-Ramirez- 02-28-2004 02:05 PM

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.

VeX_RaT_Boy 02-28-2004 02:17 PM

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.

ZeLpH_MyStiK 02-28-2004 09:09 PM

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

WanDaMan 02-28-2004 09:47 PM

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;

-Ramirez- 02-29-2004 05:59 AM

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.

VeX_RaT_Boy 02-29-2004 11:59 AM

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 :\

ZeLpH_MyStiK 02-29-2004 04:58 PM

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 =\


All times are GMT +2. The time now is 04:38 AM.

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