This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

%s inside %s without using LANG


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Owyn
Veteran Member
Join Date: Nov 2007
Old 08-02-2012 , 05:34   %s inside %s without using LANG
Reply With Quote #1

Hi, so I want to put an %s inside an %s so it would use %s while using %s

Code:
new message[100] = "%s is awesome!";
new name[50] = "Admin";

client_print( id, print_chat, "%s", message, name);
Example above doesn't work, it just shows "%s is awesome"

Code:
client_print( id, print_chat, "%L", id, "MESSAGE_LANG", name);
with
MESSAGE_LANG = %s is awesome!
In a dictionary inside lang folder for the plugin - it works fine - "Admin is awesome!" is shown, how can I do such thing without using lang I don't need?
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.

Last edited by Owyn; 08-02-2012 at 05:35.
Owyn is offline
Send a message via ICQ to Owyn
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-02-2012 , 05:49   Re: %s inside %s without using LANG
Reply With Quote #2

Your example doesn't make sense.
client_print( id, print_chat, "%s", message, name);
->
client_print( id, print_chat, message, name); <6 this should work fine.

I think you have to format one time with the 1st string, then to use client_print.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 08-02-2012 at 05:50.
ConnorMcLeod is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 08-02-2012 , 05:54   Re: %s inside %s without using LANG
Reply With Quote #3

Quote:
client_print( id, print_chat, message, name); <6 this should work fine.
That works fine ^_^ thank you. Was just following the lang example trying to make this and got wrong.
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
Old 08-02-2012, 05:54
dark_style
This message has been deleted by dark_style. Reason: connor was first
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 23:37.


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