SA-MP Forums Archive
Defining colours - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Defining colours (/showthread.php?tid=438822)



Defining colours - Gabriel1337 - 22.05.2013

Ok so on the start of the gamemode I have it like this

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <a_players>
#include <a_vehicles>
#if defined FILTERSCRIPT

//Colour Defines
#define COLOR_LIGHTGREEN x033FF00
I defined "x033FF00" as lightgreen colour but im getting this error

C:\Documents and Settings\Administrador\Ambiente de trabalho\samp03x_svr_R1-2_win32\gamemodes\two.pwn(257) : error 017: undefined symbol "COLOR_LIGHTGREEN"

Did I put the define in a wrong place? or I did anything wrong like I was just trying to do this


Код:
//When Player Connects
public OnPlayerConnect(playerid)
{
	SendClientMessage(playerid, COLOR_LIGHTGREEN, "Welcome to Twoґs Freeroam Roleplay Script");
	return 1;
}
Help Appreciated


Re: Defining colours - Abhishek. - 22.05.2013

hey sir,
you did it right and both spellings are same maybe the color id is wrong or defined
not sure but its 0xFFFFF
like that so plz check it again on wiki


Re: Defining colours - Gabriel1337 - 22.05.2013

Quote:
Originally Posted by Abhishek.
Посмотреть сообщение
hey sir,
you did it right and both spellings are same maybe the color id is wrong or defined
not sure but its 0xFFFFF
like that so plz check it again on wiki
You are right I spelled wrong its not X0 ITS 0x thanks Im new into this but im getting this all cleared out Ive been seeing some guides.


Re: Defining colours - Gabriel1337 - 22.05.2013

Weird Im still getting the undefined symbol error in this even though I edited it


Re: Defining colours - Vince - 22.05.2013

Are you writing a filterscript? If not, remove these lines:
pawn Код:
#if defined FILTERSCRIPT
#else
#endif
#define FILTERSCRIPT



Re: Defining colours - Xoomer - 22.05.2013

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript


#include <a_samp>
#include <a_players>
#include <a_vehicles>

//Colour Defines
#define COLOR_LIGHTGREEN x033FF00