Errors; -
Devine - 30.09.2009
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!
Re: Errors; -
Sayaron - 30.09.2009
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
Re: Errors; -
Devine - 30.09.2009
I removed the 39 and added the ; but now it says unbreachable code?
Re: Errors; -
kujox4 - 30.09.2009
Post the lines the errors are on and post the lines.
Re: Errors; -
Devine - 30.09.2009
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.
Re: Errors; -
kujox4 - 30.09.2009
Код:
public IsACopCar(carid)
{
if((carid == 19 || carid == 16 || carid >= 38 && carid <= 46))
{
return 1;
}
return 0;
}
Try that.
Re: Errors; -
Sayaron - 30.09.2009
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
Re: Errors; -
Devine - 30.09.2009
Niether of them worked..
[LRP] - it said GetVehicleModel wasn't defined
Re: Errors; -
Sayaron - 30.09.2009
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..
Re: Errors; -
kujox4 - 30.09.2009
Код:
public IsACopCar(carid)
{
if((carid >= 38) && (carid <= 46) || (carid == 19) || (carid == 16))
{
return 1;
}
return 0;
}
Last thoughts from me.