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

Solved Having trouble with compiling


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
francisb
Junior Member
Join Date: Oct 2018
Location: Finland
Old 05-17-2019 , 12:16   Having trouble with compiling
Reply With Quote #1

Hey, I'm new to this type of stuff and I don't really understand what to do.

So what I'm trying to do is create custom commands and when executed printing a message to chat. When compiling on https://www.sourcemod.net/compiler.php I get this error:

Code:
/home/groups/sourcemod/upload_tmp/phpT5ft37.sp(2) : fatal error 182: cannot read from file: "colors"

Compilation aborted.
1 Error.
I understand what the problem is, although I don't understand how to fix it.

The code I'm trying to compile:
Code:
#include <sourcemod>
#include <colors>

public OnPluginStart()
{
	RegConsoleCmd("sm_discord", DiscordAd);
	RegConsoleCmd("sm_sourcebans", SourceBansAd);
}

public Action:DiscordAd(client, args)
{
	CPrintToChatAll("{yellow}Kahvitauko {yellow}>>{default} {grey}discord.me/kahvitauko);
}

public Action:SourceBansAd(client, args)
{
	CPrintToChatAll("{yellow}Kahvitauko {yellow}>>{default} {grey}Tulossa!:)");
}

Last edited by francisb; 05-17-2019 at 12:44. Reason: Solved
francisb is offline
farawayf
Senior Member
Join Date: Jan 2019
Old 05-17-2019 , 12:32   Re: Having trouble with compiling
Reply With Quote #2

because its seems you dont have colors include.
Also, why are you trying to send a message to everyone? Players will flood with this.
farawayf is offline
Cruze
Veteran Member
Join Date: May 2017
Old 05-17-2019 , 12:35   Re: Having trouble with compiling
Reply With Quote #3

PHP Code:
#include <sourcemod>

public void OnPluginStart()
{
    
RegConsoleCmd("sm_discord"DiscordAd);
    
RegConsoleCmd("sm_sourcebans"SourceBansAd);
}

public 
Action DiscordAd(int clientint args)
{
    
PrintToChat(client" \x10Kahvitauko >> \x04discord.me/kahvitauko\x01");
}

public 
Action SourceBansAd(int clientint args)
{
    
PrintToChat(client" \x10Kahvitauko >> \x04Tulossa!:)\x01");

__________________
Taking paid private requests! Contact me
Cruze is offline
francisb
Junior Member
Join Date: Oct 2018
Location: Finland
Old 05-17-2019 , 12:38   Re: Having trouble with compiling
Reply With Quote #4

Quote:
Originally Posted by Cruze View Post
PHP Code:
#include <sourcemod>

public void OnPluginStart()
{
    
RegConsoleCmd("sm_discord"DiscordAd);
    
RegConsoleCmd("sm_sourcebans"SourceBansAd);
}

public 
Action DiscordAd(int clientint args)
{
    
PrintToChat(client" \x10Kahvitauko >> \x04discord.me/kahvitauko\x01");
}

public 
Action SourceBansAd(int clientint args)
{
    
PrintToChat(client" \x10Kahvitauko >> \x04Tulossa!:)\x01");

Thanks!
francisb 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 11:46.


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