What am i doing wrong?
#1

Just trying to make a command for opening the trunk where i can do /boot and the trunk opens and when i do /boot again it closes then again it opens again and so on. but i have getting errors and i cant firgure it out.
Код:
C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(5) : error 017: undefined symbol "TrunkOpen"
C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(5) : warning 215: expression has no effect
C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(5) : error 001: expected token: ";", but found "]"
C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(5) : error 029: invalid expression, assumed zero
C:\Program Files (x86)\Rockstar Games\samp\pawno\include\PlayerCommands.inc(5) : fatal error 107: too many error messages on one line
pawn Код:
CMD:boot( playerid, params[] )
{
    if( !IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, -1, "Error: You need to be in a vehicle." );
    {
        if(TrunkOpen[playerid] == true);//this line is 5
        {
            TrunkOpen[playerid] = false;
            new pVeh;
            new engine,lights,alarm,doors,bonnet,boot,objective;
            pVeh = GetPlayerVehicleID( playerid );
            GetVehicleParamsEx(pVeh, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(pVeh, engine, lights, alarm, doors, bonnet, 0, objective);
            SendClientMessage(playerid, -1, "Trunk Closed");
        }
        else
        {
            TrunkOpen[playerid] = true;
            new pVeh;
            new engine,lights,alarm,doors,bonnet,boot,objective;
            pVeh = GetPlayerVehicleID( playerid );
            GetVehicleParamsEx(pVeh, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(pVeh, engine, lights, alarm, doors, bonnet, 1, objective);
            SendClientMessage(playerid, -1, "Trunk Open");
        }
    }
    return 1;
}
I know i prolly did something simple but i cant get it fixed.

Thanks
Reply


Messages In This Thread
What am i doing wrong? - by nickdodd25 - 12.04.2012, 02:02
Re: What am i doing wrong? - by Kitten - 12.04.2012, 02:10
Re: What am i doing wrong? - by nickdodd25 - 12.04.2012, 02:26
Re: What am i doing wrong? - by Kitten - 12.04.2012, 02:51
Re: What am i doing wrong? - by nickdodd25 - 12.04.2012, 04:17
Re: What am i doing wrong? - by nickdodd25 - 13.04.2012, 05:31
Re: What am i doing wrong? - by RollTi - 13.04.2012, 05:34
Re: What am i doing wrong? - by nickdodd25 - 14.04.2012, 01:36
Re: What am i doing wrong? - by [LoF]Zak - 14.04.2012, 01:41
Re: What am i doing wrong? - by Neo Karls - 14.04.2012, 01:53
Re: What am i doing wrong? - by nickdodd25 - 14.04.2012, 02:09

Forum Jump:


Users browsing this thread: 2 Guest(s)