Raised This Month: $ Target: $400
 0% 

Colorchat problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
neutron
Member
Join Date: Jul 2011
Location: Turkey
Old 09-06-2011 , 10:16   Colorchat problem
Reply With Quote #1

I am eager to add on space, although not in the game space seems

example

PHP Code:
ColorChat(0"!g[%s]!team abcdefg +50 HP buying",playername
seems to place the arrow mark on the space

photo

__________________
neutron is offline
Send a message via Skype™ to neutron
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 09-06-2011 , 11:44   Re: Colorchat problem
Reply With Quote #2

Use trim() to trim down the spaces before the player name.
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
neutron
Member
Join Date: Jul 2011
Location: Turkey
Old 09-06-2011 , 11:56   Re: Colorchat problem
Reply With Quote #3

I'm sorry do not understand
__________________
neutron is offline
Send a message via Skype™ to neutron
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 09-06-2011 , 12:03   Re: Colorchat problem
Reply With Quote #4

After you use get the user's name, use trim(). That will remove the spaces at the start & end of the name.

PHP Code:
get_user_name(idszNamecharsmax(playername));
trim(playername);

ColorChat(0"!g[%s]!team abcdefg +50 HP buying",playername
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
neutron
Member
Join Date: Jul 2011
Location: Turkey
Old 09-06-2011 , 12:11   Re: Colorchat problem
Reply With Quote #5

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "szName" on line 41
Error: "sizeof" operator is invalid on "function" symbols on line 41
Error: Invalid expression, assumed zero on line 41
Error: Too many error messages on one line on line 41

Compilation aborted.
4 Errors.
__________________
neutron is offline
Send a message via Skype™ to neutron
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 09-06-2011 , 13:38   Re: Colorchat problem
Reply With Quote #6

Quote:
Originally Posted by neutron View Post
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "szName" on line 41
Error: "sizeof" operator is invalid on "function" symbols on line 41
Error: Invalid expression, assumed zero on line 41
Error: Too many error messages on one line on line 41

Compilation aborted.
4 Errors.
You should have basic knowledge of pawn, he made a typo which is why the error occured:
Code:
get_user_name(id, playername, charsmax(playername)); trim(playername); ColorChat(0, "!g[%s]!team abcdefg +50 HP buying",playername)
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
neutron
Member
Join Date: Jul 2011
Location: Turkey
Old 09-06-2011 , 16:19   Re: Colorchat problem
Reply With Quote #7

ok thanks
__________________
neutron is offline
Send a message via Skype™ to neutron
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-06-2011 , 16:57   Re: Colorchat problem
Reply With Quote #8

You could always just remove the space from your name. There is no other way that the space go in there.
__________________
fysiks 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 19:20.


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