Undefined symbol "COLOR_WHITE"
#1

Hello everyone.
I've defined a word with "WORD_SYSTEM", and "COL_SYSTEM", and defined SCM for SendClientMessage, here's the explanation:
PHP код:
#define COLOR_WHITE 0xFFFFFFFF
#define COL_SYSTEM "{FF7300}"
#define WORD_SYSTEM ""COL_SYSTEM"[SYSTEM]{FFFFFF} "
#define SCM SendClientMessage 
And this is the script
PHP код:
forward OnAccountLoad(playerid);
public 
OnAccountLoad(playerid)
{
    
pInfo[playerid][Admin] = cache_get_field_content_int(0"Admin");
    
pInfo[playerid][VIP] = cache_get_field_content_int(0"VIP");
    
pInfo[playerid][Money] = cache_get_field_content_int(0"Money");
    
GivePMoney(playeridpInfo[playerid][Money]);
    
SCM(playeridCOLOR_WHITE""WORD_SYSTEM"You have {00DE21}successfully{FFFFFF} logged in.");
    
pInfo[playerid][LoggedIn] = 1;
    return 
true;

The error:
Код:
C:\Program Files\MyServer\pawno\include\required/publics.inc(34) : error 017: undefined symbol "SCM"
C:\Program Files\MyServer\pawno\include\required/publics.inc(34) : error 017: undefined symbol "WORD_SYSTEM"
C:\Program Files\MyServer\pawno\include\required/publics.inc(34) : warning 215: expression has no effect
C:\Program Files\MyServer\pawno\include\required/publics.inc(34) : error 001: expected token: ";", but found ")"
C:\Program Files\MyServer\pawno\include\required/publics.inc(34) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
How to solve this?
Reply
#2

Make sure that colors and your function are on the same gamemode/include file

For example if you have OnAccountLoad function in publics.inc file and colors are not there it will print undefined errors

If you are trying to make a structured gamemode then you must colors on a custom include like defines.inc and include it in your main gamemode so you will never get errors with defines
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)