#Defines not working for me -
Issam - 19.09.2011
I'm just woundring why defines doesn't work for me,il give you a example,since i'm scripting a Turf takeover systeme.
Help
Re: #Defines not working for me -
Kush - 19.09.2011
Elaborate.
Re: #Defines not working for me -
Issam - 19.09.2011
pawn Code:
if(GetPlayersInZone(i, ZoneAttacker[i]) >= 1) // there must be at least 1 attacker left
{
ZoneAttackTime[i]++;
if(ZoneAttackTime[i] == TAKEOVER_TIME) // zone has been under attack for enough time and attackers take over the zone
{
pawn Code:
#define TAKEOVER_TIME 120 // how many seconds needed to take over the zone
#define MIN_DEATHS_TO_START_WAR 3 // how many team members must be killed in a zone to start a war
Re: #Defines not working for me -
Issam - 19.09.2011
Quote:
Originally Posted by Kush
Elaborate.
|
You mean what?
Re: #Defines not working for me -
Kush - 19.09.2011
Quote:
Originally Posted by Issam
You mean what?
|
I mean, define what you mean by "#defines not working"
Re: #Defines not working for me -
Issam - 19.09.2011
Quote:
Originally Posted by Kush
I mean, define what you mean by "#defines not working"
|
Here is a example:
pawn Code:
if(GetPlayersInZone(i, ZoneAttacker[i]) >= 1) // there must be at least 1 attacker left
{
ZoneAttackTime[i]++;
if(ZoneAttackTime[i] == TAKEOVER_TIME) // zone has been under attack for enough time and attackers take over the zone
{
pawn Code:
#define TAKEOVER_TIME 120 // how many seconds needed to take over the zone
#define MIN_DEATHS_TO_START_WAR 3 // how many team members must be killed in a zone to start a war
C
Code:
:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ms.pwn(100) : warning 217: loose indentation
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ms.pwn(612) : warning 235: public function lacks forward declaration (symbol "ZoneTimer")
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ms.pwn(618) : error 017: undefined symbol "GetPlayersInZone"
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ms.pwn(621) : error 017: undefined symbol "TAKEOVER_TIME"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: #Defines not working for me -
Shetch - 19.09.2011
Quote:
Originally Posted by Issam
also help with warning in line 612
LINE:
[pawn]public ZoneTimer()
|
add this on top of your script.
Code:
forward ZoneTimer();
Re: #Defines not working for me -
Issam - 19.09.2011
Thanks,fixed.
ANYONE Help with DEFINES?
Re: #Defines not working for me -
Vince - 19.09.2011
Check that you didn't put your defines below
#if defined FILTERSCRIPT, or they will not work (provided that you're not actually building a filterscript). Consult page 118 and 119 of pawn-lang.pdf to learn more about it.
Re: #Defines not working for me -
Issam - 19.09.2011
Y O U A R E A W E S O M E V I N C E
All my life, i ve been missed up with defines, so i didn't use them
its hard for me to edit my GameMode
Re: #Defines not working for me -
Issam - 19.09.2011
C:\DOCUME~1\SOUADU~1.000\Bureau\MYSERV~1\GAMEMO~1\ ms.pwn(651) : warning 203: symbol is never used: "playerid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
pawn Code:
stock GetPlayerZone(playerid)
{
for(new i=0; i < sizeof(ZoneInfo); i++)
{
if(IsPlayerInZone(playerid, i))
{
return i;
}
}
return -1;
}
Help me removing the warning.
Re: #Defines not working for me -
Memoryz - 19.09.2011
Which line is giving you the errors?
Re: #Defines not working for me -
Issam - 19.09.2011
Quote:
Originally Posted by Memoryz
Which line is giving you the errors?
|
its warning,and its the FIRST! :P
If the warning fixes,errors gets fixed too.. if you know what i mean.
stock GetPlayerZone(playerid)