SA-MP Forums Archive
error 029: invalid expression, assumed zero - 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: error 029: invalid expression, assumed zero (/showthread.php?tid=562920)



error 029: invalid expression, assumed zero - SvetkoBeast - 12.02.2015

error 029: invalid expression, assumed zero

Help me please

Line 172: Zone[TEAM_GROVE] = GangZoneCreate(MinX, MinX, MaxX, MaxY);


Re: error 029: invalid expression, assumed zero - HazardouS - 12.02.2015

Put that line somewhere inside a callback, function, whatever. You're probably having that line somewhere outside any function.


Re: error 029: invalid expression, assumed zero - SvetkoBeast - 12.02.2015

Quote:
Originally Posted by HazardouS
Посмотреть сообщение
Put that line somewhere inside a callback, function, whatever. You're probably having that line somewhere outside any function.
C:\Users\mitaka\Desktop\trufove.pwn(111) : warning 201: redefinition of constant/macro (symbol "TEAM_YAKUZA")
C:\Users\mitaka\Desktop\trufove.pwn(173) : warning 215: expression has no effect
C:\Users\mitaka\Desktop\trufove.pwn(173) : error 001: expected token: ";", but found "-integer value-"
C:\Users\mitaka\Desktop\trufove.pwn(173) : error 022: must be lvalue (non-constant)
C:\Users\mitaka\Desktop\trufove.pwn(173) : error 029: invalid expression, assumed zero
C:\Users\mitaka\Desktop\trufove.pwn(173) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


tCP[TEAM_GROVE] = 0;
UnderAttack[TEAM_GROVE] = 0;
Zone[TEAM_GROVE]0 = GangZoneCreate(MinX, MinX, MaxX, MaxY);
CP[TEAM_GROVE] = CreateDynamicCP(X,Y,Z, 2153.4033,-996.3683,32.1258,351.7026,0,0,0,0,0,0, 100.0);
return 1;
}


Re: error 029: invalid expression, assumed zero - HazardouS - 12.02.2015

Zone[TEAM_GROVE]0 = GangZoneCreate(MinX, MinX, MaxX, MaxY);

must be

Zone[TEAM_GROVE] = GangZoneCreate(MinX, MinX, MaxX, MaxY);

You have an extra '0' right before the '=' which doesn't belong there.

Also, next time please specify the line numbers, it's easier for us to debug your code.


Re: error 029: invalid expression, assumed zero - SvetkoBeast - 13.02.2015

Quote:
Originally Posted by HazardouS
Посмотреть сообщение
Zone[TEAM_GROVE]0 = GangZoneCreate(MinX, MinX, MaxX, MaxY);

must be

Zone[TEAM_GROVE] = GangZoneCreate(MinX, MinX, MaxX, MaxY);

You have an extra '0' right before the '=' which doesn't belong there.

Also, next time please specify the line numbers, it's easier for us to debug your code.
C:\Users\mitaka\Desktop\trufove.pwn(173) : error 029: invalid expression, assumed zero
C:\Users\mitaka\Desktop\trufove.pwn(174) : error 029: invalid expression, assumed zero
C:\Users\mitaka\Desktop\trufove.pwn(193) : error 029: invalid expression, assumed zero
C:\Users\mitaka\Desktop\trufove.pwn(197) : error 029: invalid expression, assumed zero
C:\Users\mitaka\Desktop\trufove.pwn(197) : error 029: invalid expression, assumed zero
C:\Users\mitaka\Desktop\trufove.pwn(205) : error 029: invalid expression, assumed zero
C:\Users\mitaka\Desktop\trufove.pwn(214) : error 029: invalid expression, assumed zero
C:\Users\mitaka\Desktop\trufove.pwn(223) : error 029: invalid expression, assumed zero

Line 173, 174:
Zone[TEAM_GROVE] = GangZoneCreate(MinX, MinX, MaxX, MaxY);
CP[TEAM_GROVE] = CreateDynamicCP(X,Y,Z, 2153.4033,-996.3683,32.1258,351.7026,0,0,0,0,0,0, 100.0);

Line 193-197
SetPlayerMapIcon(playerid, 2, X,Y,Z, 19, MAPICON_GLOBAL);
GangZoneShowForAll(Zone[TEAM_GROVE], 0x00000043);
IsPlayerCapturing[playerid][TEAM_GROVE] = 0;
CountVar[playerid][TEAM_GROVE] = 25;
if(tCP[TEAM_GROVE] == NONE) GangZoneShowForAll(Zone[Grove], -66);

Line 205-214
if(Captured[playerid][GROVE] == 0 && IsPlayerCapturing[playerid][GROVE] == 1)
{
LeavingCAPZONE(playerid);
}
return 1;
}

public OnPlayerSpawn(playerid)
{
if(Captured[playerid][GROVE] == 0 && IsPlayerCapturing[playerid][GROVE] == 1)

Line 223
if(Captured[playerid][GROVE] == 0 && IsPlayerCapturing[playerid][GROVE] == 1)

Please help and thanks very much !!!


Re: error 029: invalid expression, assumed zero - 1fret - 13.02.2015

At line 173 you need to add coordinates so change x,y,z to the coords.

At line 174 you need to delete x,y,z , and follow below

CreateDynamicCP(Float, Float:y, Float:z, Floatize, worldid = -1, interiorid = -1, playerid, Float:distance = 100.0);

And what I have notice is that you don't put in the coordinates dude, so at X,Y,Z you should put the coordinates.