Raised This Month: $ Target: $400
 0% 

Solved define replace


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 09-10-2017 , 09:49   Re: define replace
Reply With Quote #1

The example that i had given seems to work but it's just that I hadn't tested it out yet.
@kristi, you are right and I will use your example, because it gonna match everything, thanks you.
Code:
#define client_print(%0print_chat%1) color_print(%0true%1)

But I have another problem now. Actually I want to replace client_print native from war3ft mode with my custom stock for color message with included prefix instead to do it manually, cuz #define directive seems be easiest and fastest way. All chat message in the mode or at least those I've tested(when buying items) have added prefix, but isn't colored. Then И decided to do smoke test and added this in the test function provided by the plugin:
Code:
color_print( 0, true, "Testing: %L", id, "INFO_SHOPMENU_2", 20.0 ); client_print( 0, print_chat, "Testing: %L",id, "INFO_SHOPMENU_2", 20.0 );
It works, there is colored prefix.

But when I added this in the checks for user has enough money to buy an item even there was no prefix.
Code:
client_print( id, print_chat, "test");

WTF is happening guys?!

Last edited by KiLLeR.; 09-10-2017 at 10:03.
KiLLeR. is offline
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 09:55.


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