Raised This Month: $ Target: $400
 0% 

Return inside ``'s


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 12-25-2011 , 23:52   Re: Return inside ``'s
Reply With Quote #1

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 );
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-26-2011 , 00:20   Re: Return inside ``'s
Reply With Quote #2

Quote:
Originally Posted by nikhilgupta345 View Post
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 );
You don't need to escape a non-control character.
__________________
fysiks is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 12-26-2011 , 10:07   Re: Return inside ``'s
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
You don't need to escape a non-control character.
:O Just realized that.

No idea what he's asking for then.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:50.


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