invalid expression, assumed zero
#1

i nedd help with that error. I was making and capture zone script and when i try to compile the script i got this 3 errors. See them below:
pawn Код:
#define NOTCAP

C:\Documents and Settings\NADINE.HOME-C13C86E48E\Desktop\New Folder\sampserver 2\gamemodes\lskz.pwn(294) : error 029: invalid expression, assumed zero
C:\Documents and Settings\NADINE.HOME-C13C86E48E\Desktop\New Folder\sampserver 2\gamemodes\lskz.pwn(787) : error 029: invalid expression, assumed zero
C:\Documents and Settings\NADINE.HOME-C13C86E48E\Desktop\New Folder\sampserver 2\gamemodes\lskz.pwn(3684) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


tCP[CAPZONE] = NOTCAP;//here is line 294
UnderAttack[CAPZONE] = 0;
Zone[CAPZONE] = GangZoneCreate(653.3203125,26.3671875,653.3203125,26.3671875);
CP[CAPZONE] = CreateDynamicCP(2487.9856,-1138.1130,38.8642, 3.0, -1, -1, -1, 100.0);

  if(tCP[CAPZONE] == NOTCAP) GangZoneShowForAll(Zone[CAPZONE], -66);//line 787
    else if(tCP[CAPZONE] == TEAM_YSPAWN) GangZoneShowForAll(Zone[CAPZONE],  0xFFFF00FF);
    else if(tCP[CAPZONE] == TEAM_BALLAS) GangZoneShowForAll(Zone[CAPZONE], 0x800080FF);
    else if(tCP[CAPZONE] == TEAM_POLICE) GangZoneShowForAll(Zone[CAPZONE], 0x0000FFFF);
    else if(tCP[CAPZONE] == TEAM_BLUE) GangZoneShowForAll(Zone[CAPZONE],0x00FFFFFF);
    else if(tCP[CAPZONE] == TEAM_GROVE) GangZoneShowForAll(Zone[CAPZONE],0x008000FF);

        else if(tCP[CAPZONE] == NOTCAP)//line 3684
                {
                  SendClientMessage(playerid, COLOR_RED,"This zone is not captured by any team");
                }
Reply
#2

Try moving #define NOTCAP to the top of the script.
Reply
#3

yea its at the top
Reply
#4

You should use it as:
pawn Код:
#define <symbol1> <symbol2>
Example:
pawn Код:
#define NOTCAP 0
and this:
pawn Код:
if(tCP[CAPZONE] == NOTCAP)
would be like:
pawn Код:
if(tCP[CAPZONE] == 0)
Without using a default value in the pattern, it's like doing:
pawn Код:
if(tCP[CAPZONE] == )
which is incorrect.
Reply
#5

thanks guys +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)