Hello I know didnt post something long time here.. Just now I need your help...
#1

Hello just I will get straight to target.... So there is my code:

Код:
enum TeamCars
{
	t1,
	t2,
	t3,
	t4,
	t5,
	t6,
	t7,
	t8,
};
new Cars[TeamCars];
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	if(newstate == 2)
    {
      	new CarCheck = GetPlayerVehicleID(playerid);
    	if(CarCheck == Cars[t1] || CarCheck == Cars[t2] || CarCheck == Cars[t3] || CarCheck == Cars[t4] || CarCheck == Cars[t5])
        {
            if(gTeam[playerid] != 1 || != 2 || != 3) // on this line all errors....
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_RED, "You Don't have the keys for this car.");
            	return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "You have the keys for this car.");
            	return 1;
            }
   		}
      	return 1;
    }
	return 1;
}
Of course I added everything what was needed cars etc. So the thing is I have a errors like this :

Код:
error 029: invalid expression, assumed zero
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
fatal error 107: too many error messages on one line
Please help me out with this I hope this isn't to large and didn't need to use pastebin.. Thanks for your time and everything...
Reply
#2

Ok so, The fatal error = Their is two many mistakes on one line.
Error 001 = ";", but found ")" So, I think, maybe trying to remove it, or somethin,g I'm not the best at scripting but still.
Reply
#3

I know there is to many errors.. Just the thing is where is the problem..... If I will remove it my gang car system will not work.....
Reply
#4

The != operator needs 2 operands.

pawn Код:
if(gTeam[playerid] != 1 || gTeam[playerid] != 2 || gTeam[playerid] != 3)
Reply
#5

+ rep thanks mate Just didn't thought so far Long time didn't pawn thanks again for your help and your time
Reply
#6

Dammit, I was just about to post that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)