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

Solved Server crash when using a pre-defined prefix


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 06-24-2017 , 11:48   Server crash when using a pre-defined prefix
Reply With Quote #1

Hello,
My server just crashes when I use a prefix via a variable.
Example code:
PHP Code:
String:cmenuPrefix[] = "[{blue}WardenMenu{default}]";
CPrintToChatAll("%s %t"cmenuPrefix"Noblock off");
SetConVarInt(noblock1truetrue); 
If I do just like this then it doesn't crash and works like normal:
PHP Code:
CPrintToChatAll("%t""Noblock off");
SetConVarInt(noblock1truetrue); 
Does anyone know why it just crashes? It crashes on every method where I have a print a message with the prefix. I'm using colors.inc for the colors.
__________________

Last edited by condolent; 06-24-2017 at 13:32.
condolent is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 06-24-2017 , 12:42   Re: Server crash when using a pre-defined prefix
Reply With Quote #2

Seems like an error with colors.inc!
Anyone know a better include to use for colors in CSGO?
__________________
condolent is offline
Weetabix
Member
Join Date: Feb 2017
Location: United Kingdom
Old 06-24-2017 , 13:17   Re: Server crash when using a pre-defined prefix
Reply With Quote #3

ColorVariables by KissLick
Weetabix is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 06-24-2017 , 13:20   Re: Server crash when using a pre-defined prefix
Reply With Quote #4

Quote:
Originally Posted by Weetabix View Post
ColorVariables by KissLick
Isn't colorvariables only like "highlight" and such? If I remember correctly I can't use {red} for example with that. Or {green} for that matter?

EDIT
I was wrong! It works like a charm!
__________________

Last edited by condolent; 06-24-2017 at 13:23.
condolent is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 06-25-2017 , 10:25   Re: Server crash when using a pre-defined prefix
Reply With Quote #5

Even if ColorVariables is mainly about color variables (eg. {highlight}, {player}, {myCustomVariable}) and CSetPrefix.

It still allows you to do messy things like
PHP Code:
CPrintToChatAll("{red}[myPrefix]{default} some {green}color {blue}message..."); 
Just use variables and CSetPrefix... it's much more elegant way to manage colors...
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.

Last edited by KissLick; 06-25-2017 at 10:25.
KissLick 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:02.


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