Parse string cvar
Hello,
I want to use this function ( parse( ) ) but i don't now how to use it. I have my string cvar : PHP Code:
I want to get back the values but i don't know how when the number of values vary. PS : Sorry for my english Thank you for Answers |
Re: Parse string cvar
http://www.amxmodx.org/funcwiki.php?go=func&id=58 you have an exemple. Also you can seach, you will find numerous others exemples.
|
Re: Parse string cvar
Yes but ir we know the number of arg.
Me i don't know the number of arg can be vary ( 0 of 24 ) If the number can't be vary yes the exaemple is good for me but it's not the case |
Re: Parse string cvar
It doesn't matter. You can still used parse(). But it won't be appropriate.
You could use strbreak(), looping until the right output is empty. Something like that. |
Re: Parse string cvar
Arkshine thank you for help but i prefere with exemple can you make it because i don't understand you explications.
With my exemples, with the randomnumber of arg Plz |
Re: Parse string cvar
try this:
Code:
parse_item(string[],len,output[][]){Code:
new string[]="asda dadawd addadaw"Code:
out[0]="asda"Code:
for(new i=0;i<number;i++) client_print(0,print_chat,"%s",out[i]) |
Re: Parse string cvar
g[o]q it's that i search thank you
|
Re: Parse string cvar
Here my version :
Code:
Code:
Example with : Code:
" 54 1421 141 1 4622"Code:
[Untitled.amxx] Count = 5 |
Re: Parse string cvar
nice too
|
Re: Parse string cvar
Mine is better coded. :mrgreen: And also more suit for your need.
|
| All times are GMT -4. The time now is 00:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.