Array String Help
Hello,
I don't want to use formatex in this situation because of the problems with the ^ escape character. So don't try to tell me about formatex cuz i tried 1000 milion times. So : I have : new Array:szQuerySql = ArrayCreate( 1024 ); Then : ArrayPushString( szQuerySql, "SELECT `asd` FROM `asd` WHERE ("); Its ok. Then i want to append to that string ( select bla bla bla ) a piece of strings ( bla2string, bla3stringasd , ");" ). In the end, i want to obtain the entire string, that looks like select bla bla bla bla2string bla3stringasd ); and print it :). How to do that ? I tried with ArrayInsertStringAfter but the string remains as in the beggining. Please help ! Thanks. |
Re: Array String Help
What is the problem with the ^ ?
|
Re: Array String Help
If i formatex a string like that : "string %s", 'Mod ^.^" , it remains Mod . .. the ^ dissapear.
Could you help me with the array part? |
Re: Array String Help
You have just to escape ^, like ^^.
Or you can use for your plugin another escape character, using #pragma crltchar '\' if you want \ instead. |
Re: Array String Help
2x post.
|
Re: Array String Help
I cant escape like ^^ .. and if i change the control char with $ for example i get a lot of error at formatex html ..
|
Re: Array String Help
new string1[] = "string %s";
new string2[] = "Mod ^^.^^"; new output[ sizeof string1 + sizeof string2 ]; formatex( output, charsmax( output ), string1, string2 ); log_amx( "%s", output ); result = L 08/23/2013 - 19:51:35: [Untitled.amxx] string Mod ^.^ So, what is your problem ? Give me a concrete example which doesn't work. |
Re: Array String Help
It seems to be ok.
So i tested and its ok. The problem was in the set_fail_state( i dont used log_amx, why ? im crazy .. ). Now it's ok thanks a lot ! I just have to work a little with mysql cuz its resulting me annoyng. |
Re: Array String Help
set_fail_state() can't be formated, but as per 1.8.3-dev+, you can now.
|
Re: Array String Help
thanks.
If you want to give me an ideea, i have top 10 players. i take the players, i make a query to take their kills, i query the mysql, i use SQL_MoreResults and i have an array but the results( player's kills ) are randomly shown, not in the order i queried. an ideea to put them in order ? to make the top like : for( i = 0; i <= 9 ; i ++ ) ... i. playername[ i ] playerkills [ i ] |
| All times are GMT -4. The time now is 18:53. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.