Raised This Month: $51 Target: $400
 12% 

Print to chat problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JOMENVEST
Member
Join Date: Dec 2016
Location: Sweden
Old 12-25-2016 , 17:40   Print to chat problem
Reply With Quote #1

Tjulul!

I have a small problem with my code to print a message to chat which makes me annoyed.
The problem is a small empty space before the second line's message. And.. no, I don't have any spaces in the file at this place.

https://gyazo.com/beec77ce412db62d9b0bc7f3dedc7e9e

Helpful for everything!
JOMENVEST is offline
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 12-25-2016 , 19:44   Re: Print to chat problem
Reply With Quote #2

I believe the space is required for the colours to work. Sorry if I'm wrong, but that's what I was told when I started.
Michael Shoe Maker is offline
JOMENVEST
Member
Join Date: Dec 2016
Location: Sweden
Old 12-25-2016 , 20:39   Re: Print to chat problem
Reply With Quote #3

Yeah, I was on that way of thinking too. But I seen it's been working on some plugins.
Anyone have a solution?
JOMENVEST is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 12-26-2016 , 05:41   Re: Print to chat problem
Reply With Quote #4

Well you should share us the few lines printing your chat. If you use translation file, you shouldn't check if there's a space in the code only, but also in the translation file.
__________________
Benoist3012 is offline
JOMENVEST
Member
Join Date: Dec 2016
Location: Sweden
Old 12-26-2016 , 06:09   Re: Print to chat problem
Reply With Quote #5

I don't have translation for it, only the scripting file.

PHP Code:
PrintToChatAll(" \x03%s  \x0E[%s]  \x01connected"nameauthid); 
JOMENVEST is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 12-27-2016 , 09:11   Re: Print to chat problem
Reply With Quote #6

Quote:
Originally Posted by JOMENVEST View Post
And.. no, I don't have any spaces in the file at this place.
Quote:
Originally Posted by JOMENVEST View Post
I don't have translation for it, only the scripting file.

PHP Code:
PrintToChatAll(" \x03%s  \x0E[%s]  \x01connected"nameauthid); 

There's a space here V
PHP Code:
 PrintToChatAll(" \x03%s  \x0E[%s]  \x01connected"nameauthid); 
PHP Code:
 PrintToChatAll("there\x03%s  \x0E[%s]  \x01connected"nameauthid); 
__________________

Last edited by Benoist3012; 12-27-2016 at 09:12.
Benoist3012 is offline
JOMENVEST
Member
Join Date: Dec 2016
Location: Sweden
Old 12-27-2016 , 14:02   Re: Print to chat problem
Reply With Quote #7

The space is needed for the color to work... Thats how the engine in CSGO is...
JOMENVEST is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 12-27-2016 , 16:17   Re: Print to chat problem
Reply With Quote #8

Quote:
Originally Posted by JOMENVEST View Post
The problem is a small empty space before the second line's message. And.. no, I don't have any spaces in the file
Quote:
Originally Posted by JOMENVEST View Post
PHP Code:
PrintToChatAll(" \x03%s  \x0E[%s]  \x01connected"nameauthid); 
LMFAO.

Edit:

You cant use a color control character for the first char. Hence the 1v1 plugin has a '[' first.
__________________

Last edited by Neuro Toxin; 12-27-2016 at 16:19.
Neuro Toxin is offline
JOMENVEST
Member
Join Date: Dec 2016
Location: Sweden
Old 12-27-2016 , 16:49   Re: Print to chat problem
Reply With Quote #9

I guess I gotta deal with it, thanks.
JOMENVEST 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 00:32.


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