AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   space in %s (https://forums.alliedmods.net/showthread.php?t=1607)

Fean0r 05-02-2004 16:10

space in %s
 
if %s = the man

its only picks up "the"

client_cmd(id,"%s %s", blah1, blah2)

How can I make the 2nd %2 include "the man"

Thanks

knekter 05-02-2004 17:20

blah1[] = "whatever"
blah2[] = "the man"

Fean0r 05-02-2004 17:49

Maybe I explained that badly

blah2 already equals "the man" but when I run a command it only picks up "the"

If I do client_print(id,print_notify,"%s %s", blah1, blah2) is does show "the man" but using client_cmd( is does nt...

knekter 05-02-2004 17:52

hmm
 
Thats odd, cant help ya there :| sry

AssKicR 05-02-2004 18:55

try

client_print(id,print_notify,"%s ^"%s^"", blah1, blah2)

SidLuke 05-02-2004 19:08

Quote:

Originally Posted by AssKicR
try

client_print(id,print_notify,"%s ^"%s^"", blah1, blah2)

He is talking about client_cmd
:lol:

SidLuke 05-02-2004 19:18

Maybe just try:
client_cmd(id,blah1, blah2) :?:

AssKicR 05-02-2004 19:39

Quote:

Originally Posted by SidLuke
Quote:

Originally Posted by AssKicR
try

client_print(id,print_notify,"%s ^"%s^"", blah1, blah2)

He is talking about client_cmd
:lol:

do client_cmd(id,print_notify,"%s ^"%s^"", blah1, blah2) then :P

Fean0r 05-02-2004 19:47

Great thanks

1 last thing..

read_argv(1, blah1, 49)

if I use "amx_test one two" would the above return "one two" or just "one" (I want it to return "one two" - I really want to to return anything after amx_text so it could be "one two three four five etc" )

Thanks.

devicenull 05-02-2004 20:10

Just one
Use..
read_argv(string,128)
copy(params,128,string[9]) //9 = strlen(amx_test )

Fean0r 05-03-2004 04:26

amx_point.sma(37) : error 029: invalid expression, assumed zero
amx_point.sma(38) : error 035: argument type mismatch (argument 1)

I get the following error with that code...

any ideas?

Fean0r 05-03-2004 05:04

read_args(blah1, 49)

That works :)


All times are GMT -4. The time now is 07:03.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.