HELP WITH THE DEFINE PART
#1

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
Reply
#2

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'
Reply
#3

*Check post above*
Reply
#4

I dint Get it. need some more information
Reply
#5

NVM I GOT IT. THANKS FOR THE HELP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)