PDA

View Full Version : Getting AAALOT of errors


goviscrap
13/06/2013, 10:12 PM
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;
}

HurtLocker
13/06/2013, 10:18 PM
if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
else
{This makes no sense at all.

-CaRRoT
13/06/2013, 10:19 PM
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.

goviscrap
13/06/2013, 10:30 PM
Now Im getting this error:
(14157) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright (c) 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;
}

HurtLocker
13/06/2013, 10:36 PM
Do notice my above post.

-CaRRoT
13/06/2013, 10:41 PM
What hurtlocker said.

What are you trying to do here ?

if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
{
else
{

As it's useless.