Getting AAALOT of errors
#1

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;
		}
Reply
#2

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.
Reply
#3

PHP код:
if(IsATruck(newcar))//NEGERJO
        
{
            if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 3)
            {
                else
                   {
                      new 
rand random(5);
                    switch(
rand)
                    {
                        case 
0:
                        {
                            
SetPlayerCheckpoint(playeridMission13.0);
                        }
                        case 
1:
                        {
                            
SetPlayerCheckPoint(playeridMission23.0);
                        }
                        case 
2:
                        {
                            
SetPlayerCheckPoint(playeridMission33.0);
                        }
                        case 
3:
                        {
                            
SetPlayerCheckPoint(playeridMission53.0);
                        }
                        case 
4:
                        {
                            
SetPlayerCheckPoint(playeridMission63.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.
Reply
#4

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;
        }
Reply
#5

Do notice my above post.
Reply
#6

What hurtlocker said.

What are you trying to do here ?

PHP код:
            if(PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == || PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 3)
            {
                else
                   { 
As it's useless.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)