help (AGAIN)
#1

hey guys i took a look at Haydz liferaft script and i got some of its errors out but when i tried to compile it ive narrowed the errors to 4 errors can u help me with em

Code:
Code:
	if (strcmp("/liferaft", cmdtext, true) == 0)
	{
	    veh = GetPlayerVehicleID(playerid);
	    GetVehicleHealth(veh, health);
	    if(IsPlayerInAnyVehicle(playerid)) else SendClientMessage(playerid, COLOR_RED,"You need to be in a plane to deploy the liferafts");
	    if(health >500) return SendClientMessage(playerid,COLOR_RED,"You can only spawn the life raft when you're in an emergency");
	    SendClientMessage(playerid,COLOR_GREEN,"Liferafts deployed");
	    GetPlayerPos(playerid, X, Y, Z);
	    CreateVehicle(473, X, Y, Z-5, 82.2873, 0, 1, 59);
	    }
	return 1;
}
Errors:
Code:
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\Interiors.pwn(274) : error 010: invalid function or declaration
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\Interiors.pwn(278) : error 010: invalid function or declaration
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\Interiors.pwn(279) : error 010: invalid function or declaration
C:\Documents and Settings\Rhys\Desktop\GTA SA Car, plane, Bike, Cleo, Boat ect mods\Carrier Wars\filterscripts\Interiors.pwn(284) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
please help
Reply
#2

Do you have
pawn Code:
Float:x, Float:y, Float:z, Float:health
? If not, add them to your command
Reply
#3

that caused alot of trouble when i added them but ill try again
Reply
#4

same 4 errors
Reply
#5

pawn Code:
CMD:liferaft(playerid, params[])
{
    new Float:health, Float:X, Float:Y, Float:Z;
    new veh = GetPlayerVehicleID(playerid);
    GetVehicleHealth(veh, health);
    if(IsPlayerInAnyVehicle(playerid))
    {
        if(health >500) return SendClientMessage(playerid,-1,"You can only spawn the life raft when you're in an emergency");
        SendClientMessage(playerid,-1,"Liferafts deployed");
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(473, X, Y, Z-5, 82.2873, 0, 1, 59);
    } else SendClientMessage(playerid, -1,"You need to be in a plane to deploy the liferafts");
    return 1;
}
This worked for me. Just change it back to strcmp
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)