Return inside ``'s
For example:
`Kill_1` = '5', `Kill_2` = '6' or `Kill_1` = '5', `Kill_2` = '8', `Kill_3` = '9' How to return all strings inside ``'s |
Re: Return inside ``'s
Explain better from what you start and what you want as result please.
|
Re: Return inside ``'s
Its for achievement api,
so I save with a stringt, for example: Ach_Save("`Kill_1` = '5', `Kill_2` = '8', `Kill_3` = '9'", steamid) Then main achievement handler, needs to get all inside ``'s -> So: `Kill_1` `Kill_2` `Kill_3` & then I can check if player earned an achievement. I hope u understand it a little more now :p |
Re: Return inside ``'s
And what is the problem ?
If a char is not passed or make the string to be cut, then use the ctrl char \ before that char. |
Re: Return inside ``'s
I don't entirely understand what you are actually doing but it sounds like you need to rethink your method of storing that info and how you store it in memory when you read it from where you permanently store it.
How are you storing this info in permanent storage? Nvault? txt? etc. |
Re: Return inside ``'s
I'm guessing that he's using SQL, and he's using the single quotations to signify a string in mysql.
You could use the escape character '^' in order to use the single quotations without the compiler thinking that it is a start of a char. Then, you could use strtok or strbreak in order to get the individual parameters within it. For example: Ach_Save("^'Kill_1^' = ^'5^', ^'Kill_2^' = ^'8^', ^'Kill_3^' = ^'9^'", steamid ); |
Re: Return inside ``'s
Quote:
|
Re: Return inside ``'s
Quote:
No idea what he's asking for then. |
| All times are GMT -4. The time now is 11:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.