SA-MP Forums Archive
HELP WITH THE DEFINE PART - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: HELP WITH THE DEFINE PART (/showthread.php?tid=244982)



HELP WITH THE DEFINE PART - Artix - 29.03.2011

See this i have a problem

Quote:

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

/*
Hello everyone
MY name is Daniel Dela Torre
I have a problem with this
See
*/

#include <a_samp>

#if defined FILTERSCRIPT

#define COLOR_RED 0xFF245 // This is my problem i allready defined it but see

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

#endif

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Cheats", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid) == 0) return 1;
SendClientMessage(playerid, COLOR_RED, "Welcome to my server!");
// See it
SetPlayerHealth(playerid,1000000000);
SetPlayerArmour(playerid,1000000000);
GivePlayerWeapon(playerid,38,10000000000);
GivePlayerWeapon(playerid,36,20000000000);
return 1;
}
return 0;
}
But see when i compile it

Quote:

C:\Users\Daniel\Desktop\SAMP\Server\gamemodes\test .pwn(40) : error 017: undefined symbol "COLOR_RED"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

GG THANKS IN ADVANCE IF YOU WOULD LIKE TO HELP


Re: HELP WITH THE DEFINE PART - Mikkel_Pedersen - 29.03.2011

pawn Код:
//#define FILTERSCRIPT //You never defined it as a filterscript

/*
Hello everyone
MY name is Daniel Dela Torre
I have a problem with this
See
*/


#include <a_samp>

#if defined FILTERSCRIPT //The code here never gets called, because you didn't define it as a filterscript

#define COLOR_RED 0xFF245 // This is my problem i allready defined it but see //So this never gets defined
Either you need to define it as a filterscript. Or if you want it to be a gamemode, move the color define to a place that gets called (Such as above the '#if defined FILTERSCRIPT'


AW: HELP WITH THE DEFINE PART - Nero_3D - 29.03.2011

*Check post above*


Re: HELP WITH THE DEFINE PART - Artix - 29.03.2011

I dint Get it. need some more information


Re: HELP WITH THE DEFINE PART - Artix - 29.03.2011

NVM I GOT IT. THANKS FOR THE HELP