Errors;
#1

Can someone help me? I'm getting these errors;

error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

The line;
if(carid == 19 || carid == 38 || carid == 16 || carid == 43)|| carid == 44 || carid == 45 || carid == 46 || carid == 42 || carid == 41 || carid == 40 || carid == 39 || carid == 39)

Please help!
Reply
#2

pawn Код:
if(carid == 19 || carid == 38 || carid == 16 || carid == 43)|| carid == 44 || carid == 45 || carid == 46 || carid == 42 || carid == 41 || carid == 40 || carid == 39);
ur where missing the ";" and also you got 39 twice
Reply
#3

I removed the 39 and added the ; but now it says unbreachable code?
Reply
#4

Post the lines the errors are on and post the lines.
Reply
#5

C:\Users\Owner\Desktop\New Folder\gamemodes\xxxxx.pwn(301 : error 036: empty statement
C:\Users\Owner\Desktop\New Folder\gamemodes\xxxxx.pwn(3022) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
line 3018;
if(carid == 19 || carid == 38 || carid == 16 || carid == 43 || carid == 44 || carid == 45 || carid == 46 || carid == 42 || carid == 41 || carid == 40 || carid == 39);

line 3022;
return 0;

full code;
pawn Код:
public IsACopCar(carid)
{
    if(carid == 19 || carid == 38 || carid == 16 || carid == 43 || carid == 44 || carid == 45 || carid == 46 || carid == 42 || carid == 41 || carid == 40 || carid == 39);
    {
        return 1;
    }
    return 0;
}
EDIT: Gah, pawn code fucked up the indentation, lol.
Reply
#6

Код:
public IsACopCar(carid)
{
	if((carid == 19 || carid == 16 || carid >= 38 && carid <= 46))
	{
		return 1;
	}
	return 0;
}
Try that.
Reply
#7

pawn Код:
public IsACopCar(carid)
{   new carid = GetVehicleModel(vehicleid);
    if(carid == 19 || carid == 38 || carid == 16 || carid == 43 || carid == 44 || carid == 45 || carid == 46 || carid == 42 || carid == 41 || carid == 40 || carid == 39);
    {
        return 1;
    }
    return 0;
}
Try that
Reply
#8

Niether of them worked..
[LRP] - it said GetVehicleModel wasn't defined
Reply
#9

Quote:
Originally Posted by Devine
Niether of them worked..
[LRP] - it said GetVehicleModel wasn't defined
Sorry, dont know what defines your using. Just replace GetVehicleModel to your carid define thingy if you got any..
Reply
#10

Код:
public IsACopCar(carid)
{
	if((carid >= 38) && (carid <= 46) || (carid == 19) || (carid == 16))
	{
		return 1;
	}
	return 0;
}
Last thoughts from me.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)