PDA

View Full Version : Lock error


uprp
03/09/2011, 10:03 AM
i am using AVS, and managed to put this to MY CAR SYSTEM


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

Jack_Leslie
03/09/2011, 10:09 AM
We can't help if you don't give us the exact errors really!

uprp
03/09/2011, 10:10 AM
Like i just stated, i got over 100 errors.

I need someone to completely fix that code.

Alvin007
03/09/2011, 10:22 AM
past the error log

uprp
03/09/2011, 10:30 AM
past the error log

Oh my god.

Please read the message above you.

Thanks.

Darnell
03/09/2011, 10:46 AM
Try missing brackets finder & auto-ident tool.