Getting AAALOT of errors - 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: Getting AAALOT of errors (
/showthread.php?tid=443797)
Getting AAALOT of errors -
goviscrap - 13.06.2013
I probably have missed a bracket or something somewhere but cant see it? :O
Please help me
Код:
if(IsATruck(newcar))//NEGERJO
{
if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
else
{
new rand = random(5);
switch(rand)
{
case 0:
{
SetPlayerCheckpoint(playerid, Mission1, 3.0);
}
case 1:
{
SetPlayerCheckPoint(playerid, Mission2, 3.0);
}
case 2:
{
SetPlayerCheckPoint(playerid, Mission3, 3.0);
}
case 3:
{
SetPlayerCheckPoint(playerid, Mission5, 3.0);
}
case 4:
{
SetPlayerCheckPoint(playerid, Mission6, 3.0);
}
}
return 1;
}
AW: Getting AAALOT of errors -
HurtLocker - 13.06.2013
pawn Код:
if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
else
{
This makes no sense at all.
Re: Getting AAALOT of errors -
-CaRRoT - 13.06.2013
PHP код:
if(IsATruck(newcar))//NEGERJO
{
if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
else
{
new rand = random(5);
switch(rand)
{
case 0:
{
SetPlayerCheckpoint(playerid, Mission1, 3.0);
}
case 1:
{
SetPlayerCheckPoint(playerid, Mission2, 3.0);
}
case 2:
{
SetPlayerCheckPoint(playerid, Mission3, 3.0);
}
case 3:
{
SetPlayerCheckPoint(playerid, Mission5, 3.0);
}
case 4:
{
SetPlayerCheckPoint(playerid, Mission6, 3.0);
}
}
}
}
return 1;
}
You missed 2.
EDIT : And what the above said - I didn't actually read the code - I just noticed the missing brackets.
Re: Getting AAALOT of errors -
goviscrap - 13.06.2013
Now Im getting this error:
Код:
(14157) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
And here is the code
Код:
if(IsATruck(newcar))//NEGERJO
{
if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
else
{
new rand = random(5);
switch(rand)
{
case 0:
{
SetPlayerCheckpoint(playerid, Mission1, 3.0);
}
case 1:
{
SetPlayerCheckpoint(playerid, Mission2, 3.0);
}
case 2:
{
SetPlayerCheckpoint(playerid, Mission3, 3.0);
}
case 3:
{
SetPlayerCheckpoint(playerid, Mission5, 3.0);
}
case 4:
{
SetPlayerCheckpoint(playerid, Mission6, 3.0);
}
}
}
}
return 1;
}
AW: Getting AAALOT of errors -
HurtLocker - 13.06.2013
Do notice my above post.
Re: Getting AAALOT of errors -
-CaRRoT - 13.06.2013
What hurtlocker said.
What are you trying to do here ?
PHP код:
if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
else
{
As it's useless.