i need help on this code
#1

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext, "/lock", true))
    {
        if(!IsPlayerInAnyVehicle(playerid))
            return SendClientMessage(playerid,0xFFFFFFAA,"You have to be inside a vehicle."); // player has to be in a vehicle
        if(GetPlayerVehicleSeat(playerid) != 0)
            return SendClientMessage(playerid,0xFFFFFFAA,"You have to be a driver."); // player has to be a driver
        if(PlayerCar[playerid] != -1) //this is the line 313
        {
            LockedCar[PlayerCar[playerid]] = 0; // if player has any locked vehicle it will unlock it, allowing him to lock current vehicle - every player can have only one locked vehicle
        }
        PlayerCar[playerid] = GetPlayerVehicleID(playerid); // bounds vehicle to a player
        LockedCar[GetPlayerVehicleID(playerid)] = 1; // locks vehicle
        return 1;
    }
    if(!strcmp(cmdtext, "/unlock", true))
    {
        if(!IsPlayerInAnyVehicle(playerid))
            return SendClientMessage(playerid,0xFFFFFFAA,"You have to be inside a vehicle.");
        if(GetPlayerVehicleSeat(playerid) != 0)
            return SendClientMessage(playerid,0xFFFFFFAA,"You have to be a driver.");
        PlayerCar[playerid] = -1; // tells server that this player don't have any locked vehicle
        LockedCar[GetPlayerVehicleID(playerid)] = 0; // unlocks current vehicle
        return 1;
	)
	return 0;
)

Код:
C:\Documents and Settings\Administrador.EQUIPO\Bureau\grandlarc.pwn(313) : error 017: undefined symbol "PlayerCar"
C:\Documents and Settings\Administrador.EQUIPO\Bureau\grandlarc.pwn(313) : warning 215: expression has no effect
C:\Documents and Settings\Administrador.EQUIPO\Bureau\grandlarc.pwn(313) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Administrador.EQUIPO\Bureau\grandlarc.pwn(313) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrador.EQUIPO\Bureau\grandlarc.pwn(313) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply


Messages In This Thread
i need help on this code - by tooq - 16.05.2014, 19:08
Re: i need help on this code - by Konstantinos - 16.05.2014, 19:11
Re: i need help on this code - by rumen98 - 16.05.2014, 19:13
Re: i need help on this code - by Sandiel - 16.05.2014, 19:13
Re : i need help on this code - by tooq - 16.05.2014, 19:16

Forum Jump:


Users browsing this thread: 1 Guest(s)