one error - 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: one error (
/showthread.php?tid=493048)
one error -
Vanter - 06.02.2014
pawn Код:
if(IsPlayerInRangeOfPoint(i, 20.0, X, Y, Z) && gTeam[i] == TEAM_CIVIL[i] && GetPlayerWantedLevel(i) < 4 && IsFrozen[i] != 1 && InAdminMode[i] != 1 && HasTicket[i] != 1)
Код:
E:\San Andreas Cops and Criminals\San Andreas Cops and Criminals\Version 0.5\gamemodes\SACNCv0.5.pwn(5678) : error 001: expected token: ";", but found "]"
Re: one error -
BullseyeHawk - 06.02.2014
pawn Код:
if( (IsPlayerInRangeOfPoint(i, 20.0, X, Y, Z)) && (gTeam[i] == TEAM_CIVIL[i]) && (GetPlayerWantedLevel(i) < 4) && (IsFrozen[i] != 1) && (IsAdminMode[i] != 1) && (HasTicket[i] != 1))
You closed the if statement right after IsPlayerInRangeOfPoint, I've fixed it for you.
Small issues that are easy to fix, my TIP: Re-write the line, you'll probably notice it.
EDIT: Oh well, my keyboard just spazzed out and made me see the wrong error. Let me look at it again, I've just declared anothe error.
EDIT #2: I believe this should work, I've found out nothing wrong with the line after re-writing it three times. Are you sure this is the line?
It might be due to a variable being declared wrongfully or something mixing up inside the script.
Re: one error -
Vanter - 06.02.2014
made it
pawn Код:
if(IsPlayerInRangeOfPoint(i, 20.0, X, Y, Z))
{
if(gTeam[i] == TEAM_CIVIL[i] && GetPlayerWantedLevel(i) < 4 && IsFrozen[i] != 1 && InAdminMode[i] != 1 && HasTicket[i] != 1)
{
same error still in the second line.
Re: one error -
BullseyeHawk - 06.02.2014
pawn Код:
if(IsPlayerInRangeOfPoint(i, 20.0, X, Y, Z))
if(gTeam[i] == TEAM_CIVIL[i])
if(GetPlayerWantedLevel(i) < 4)
if(IsFrozen[i] != 1)
if(IsAdminMode[i] != 1)
if(HasTicket[i] != 1)
Add that and tell me which line of those has the error, as I suspect you're declaring something wrongfully and it translates into that error inside the if.
Re: one error -
Vanter - 06.02.2014
if(gTeam[i] == TEAM_CIVIL[i])
and
if(IsAdminMode[i] != 1)
Re: one error -
Konstantinos - 06.02.2014
pawn Код:
gTeam[i] == TEAM_CIVIL[i]
It should be:
Re: one error -
Vanter - 06.02.2014
we're fucking idiots, fixed.