Raised This Month: $32 Target: $400
 8% 

#define uses in quotes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hyphen
Senior Member
Join Date: Aug 2011
Old 06-07-2012 , 13:35   #define uses in quotes
Reply With Quote #1

Just a small query. How do I use some defined values with a string.

Code:
#define KICK_REASON "Some reason goes here"

public kick_player()
{
server_cmd("kick #%d ^"Some reason goes here^"", get_user_userid(id))
}
how do I replace this server_cmd("kick #%d ^"Some reason goes here^"", get_user_userid(id)) with use of KICK_REASON
hyphen is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-07-2012 , 13:40   Re: #define uses in quotes
Reply With Quote #2

%s, then add KICK_REASON in the end of server_cmd.
__________________
<VeCo> is offline
hyphen
Senior Member
Join Date: Aug 2011
Old 06-07-2012 , 13:58   Re: #define uses in quotes
Reply With Quote #3

oh, the simple thing I missed, I did this before. Just now out of my mind.
hyphen is offline
Reply


Thread Tools
Display Modes

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 15:34.


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