AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with parse (https://forums.alliedmods.net/showthread.php?t=232364)

pacheco 12-29-2013 13:18

Help with parse
 
I want to parse string with one way that parse string with space, look

Code:

string = "pacheco alliedmodders 100 200" // Name, Number, Number
parse(string, sz1, charsmax(sz1), sz2, charsmax(sz2), sz3, charsmax(sz3))

I need sz1 = "pacheco alliedmodders", sz2 = "100", sz3 = "200" how to ?

(I know sz1 will be only "pacheco", sz2 only "alliedmodders" and sz3 "100")

akcaliberg 12-29-2013 16:56

Re: Help with parse
 
Quote:

Originally Posted by pacheco (Post 2078058)
(I know sz1 will be only "pacheco", sz2 only "alliedmodders" and sz3 "100")

Why don't you simply combine the sz1 and the sz2 ?

fysiks 12-29-2013 18:43

Re: Help with parse
 
If the intended source of the string is a file or from a command, just put quotes around the parts you want in a single variable.

pacheco 12-30-2013 20:07

Re: Help with parse
 
Quote:

Why don't you simply combine the sz1 and the sz2 ?
I can't, because it's a nfvault file, and it can have space or can't have space too. Thanks.

Quote:

If the intended source of the string is a file or from a command, just put quotes around the parts you want in a single variable.
I thought quotes wouldn't work.. but for now it's ok. Thanks.


All times are GMT -4. The time now is 10:14.

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