06.05.2012, 09:37
im missing brackets in my gm.
this is what the Missed bracket finder says:
this the area around that line:
this is what the Missed bracket finder says:
Код:
MISSING BRACKET: The { bracket on line 19851 does not have a pair!
pawn Код:
command(givecar, playerid, params[])
{
new id, vehslot, string[128];
if(sscanf(params, "ud", id, vehslot))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /givecar [playerid] [1-3]");
}
else
{
if(IsPlayerConnectedEx(id))
{
if(vehslot >= 1 && vehslot < 4)
{//line 19851
switch(vehslot)
{
case 1:
{
if(Player[playerid][PlayerCarModel] >= 1)
{
if(GetDistanceBetweenPlayers(playerid, id) < 7)
{
Player[id][PendingCarReceival] = playerid;
Player[id][GivingSlot] = 1;
format(string, sizeof(string), "You have requested to give your vehicle to %s from slot 1.", GetName(id));
SendClientMessage(playerid, WHITE, string);
format(string, sizeof(string), "%s is requesting to give you their vehicle (type /approve givecar).", GetName(playerid));
SendClientMessage(id, NICESKY, string);
}
else
{
SendClientMessage(playerid, WHITE, "You're too far away!");
}
}
else
{
SendClientMessage(playerid, WHITE, "You don't have a vehicle in this slot.");
}
}
case 2:
{
if(Player[playerid][PlayerCarModel2] >= 1)
{
if(GetDistanceBetweenPlayers(playerid, id) < 7)
{
Player[id][PendingCarReceival] = playerid;
Player[id][GivingSlot] = 2;
format(string, sizeof(string), "You have requested to give your vehicle to %s from slot 2.", GetName(id));
SendClientMessage(playerid, WHITE, string);
format(string, sizeof(string), "%s is requesting to give you their vehicle (type /approve givecar).", GetName(playerid));
SendClientMessage(id, NICESKY, string);
}
else
{
SendClientMessage(playerid, WHITE, "You're too far away!");
}
}
else
{
SendClientMessage(playerid, WHITE, "You don't have a vehicle in this slot.");
}
}
case 3:
{
if(Player[playerid][PlayerCarModel3] >= 1)
{
if(GetDistanceBetweenPlayers(playerid, id) < 7)
{
Player[id][PendingCarReceival] = playerid;
Player[id][GivingSlot] = 3;
format(string, sizeof(string), "You have requested to give your vehicle to %s from slot 3.", GetName(id));
SendClientMessage(playerid, WHITE, string);
format(string, sizeof(string), "%s is requesting to give you their vehicle (type /approve givecar).", GetName(playerid));
SendClientMessage(id, NICESKY, string);
}
else
{
SendClientMessage(playerid, WHITE, "You're too far away!");
}
}
else
{
SendClientMessage(playerid, WHITE, "You don't have a vehicle in this slot.");
}
}
}
}
else
{
SendClientMessage(playerid, WHITE, "Invalid vehicle slot.");
}
}
else
{
SendClientMessage(playerid, WHITE, "That specified player not connected or isn't logged in.");
}
}
return 1;
}