SA-MP Forums Archive
Lock error - 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)
+--- Thread: Lock error (/showthread.php?tid=280839)



Lock error - uprp - 03.09.2011

i am using AVS, and managed to put this to MY CAR SYSTEM

pawn Код:
CMD:vlock(playerid, params[])
{
    new vehicleid;
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        vehicleid = GetPlayerVehicleID(playerid);
    }
    else
    {
        vehicleid = GetClosestVehicle(playerid);
        if(!PlayerToVehicle(playerid, vehicleid, 5.0)) vehicleid = 0;
    }
    if(!vehicleid) return SendClientMessage(playerid, COLOR_RED, "You are not close to a vehicle!");
            new playercar1 = PlayerInfo[playerid][CarLinkID];
            new playercar2 = PlayerInfo[playerid][Car2LinkID];
    if(!IsValidVehicle(id)) return SendClientMessage(playerid, COLOR_RED, "You don't have the keys for this vehicle!");
            new playercar1 = PlayerInfo[playerid][CarLinkID];
            new playercar2 = PlayerInfo[playerid][Car2LinkID];
        return SendClientMessage(playerid, COLOR_RED, "You don't have the keys for this vehicle!");
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    if(doors == 1)
    {
        doors = 0;
        GameTextForPlayer(playerid, "~g~doors unlocked", 3000, 6);
    }
    else
    {
        doors = 1;
        GameTextForPlayer(playerid, "~r~doors locked", 3000, 6);
    }
    SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    return 1;
}
I use:
new playercar1 = PlayerInfo[playerid][CarLinkID];
new playercar2 = PlayerInfo[playerid][Car2LinkID];

Pawno even crashes with so many erros


Re: Lock error - Jack_Leslie - 03.09.2011

We can't help if you don't give us the exact errors really!


Re: Lock error - uprp - 03.09.2011

Like i just stated, i got over 100 errors.

I need someone to completely fix that code.


Re : Lock error - Alvin007 - 03.09.2011

past the error log


Re: Re : Lock error - uprp - 03.09.2011

Quote:
Originally Posted by Alvin007
Посмотреть сообщение
past the error log
Oh my god.

Please read the message above you.

Thanks.


Re: Lock error - Darnell - 03.09.2011

Try missing brackets finder & auto-ident tool.