SA-MP Forums Archive
What's wrong - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What's wrong (/showthread.php?tid=260130)



What's wrong - Face9000 - 07.06.2011

pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
    if(GetVehicleModel(vehicleid) == 520 || GetVehicleModel(vehicleid) == 425
    {
    new Float:health;
    new car;
    car = GetPlayerVehicleID(playerid);
    GetVehicleHealth(car, health)
    if{health < 250) return SendClientMessageToAll(COLOR_YELLOW, "Watch out! A AIR-WAR vehicle is coming down from the sky! Watch your head!");
    }
    return 1;
}
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
error 008: must be a constant expression; assumed zero

Thanks.


Re: What's wrong - xRyder - 07.06.2011

pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
    if(GetVehicleModel(vehicleid) == 520 || GetVehicleModel(vehicleid) == 425)
    {
        new Float:health;
        new car;
        car = GetPlayerVehicleID(playerid);
        GetVehicleHealth(car, health);
        if{health < 250) return SendClientMessageToAll(COLOR_YELLOW, "Watch out! A AIR-WAR vehicle is coming down from the sky! Watch your head!");
    }
    return 1;
}
?
You forgot a closing bracket at "...GetVehicleModel(vehicleid) == 425...".


Re: What's wrong - Face9000 - 07.06.2011

expected token: "*then", but found "return"
must be a constant expression; assumed zero

Error line:

pawn Код:
if{health < 250) return SendClientMessageToAll(COLOR_YELLOW, "Watch out! An AIR-WAR vehicle is coming down from the sky! Watch your head!");
Thanks. ^^


Re: What's wrong - xRyder - 07.06.2011

Here:
pawn Код:
if(GetVehicleModel(vehicleid) == 520 || GetVehicleModel(vehicleid) == 425)
    {
        new Float:health;
        new car;
        car = GetPlayerVehicleID(playerid);
        GetVehicleHealth(car, health);
        if(health < 250) return SendClientMessageToAll(COLOR_YELLOW, "Watch out! A AIR-WAR vehicle is coming down from the sky! Watch your head!");
    }
You putted the "{" where it should go "(".

Quote:
Originally Posted by Logitech90
if{health < 250)



Re: What's wrong - Face9000 - 07.06.2011

Right,thanks ^^