31.08.2011, 20:27
I need some help with this command i edited from another post on the forum.
these are the errors i get:
pawn Код:
CMD:drag(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
{
new giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /drag [playerid]");
}
if(IsPlayerConnected(giveplayerid))
{
if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
{
SendClientMessage(playerid, COLOR_GREY, " You can't drag Cops !");
return 1;
}
if(DragOff[giveplayerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " You Are already being Dragged!");
return 1;
}
if (ProxDetectorS(3.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You Cannot Drag Yourself!"); return 1; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You are being dragged by %s,", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* You begin to drag %s,", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s has started to drag %s.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
TogglePlayerControllable(giveplayerid, 0);
DragOff[giveplayerid] = playerid;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That Player is not near you !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not a Cop / FBI / National Guard!");
}
}
return 1;
}
CMD:stopdrag(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
{
new string[128], giveplayerid
if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /drag [playerid]");
return 1;
}
if(IsPlayerConnected(giveplayerid))
{
if (ProxDetectorS(3.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot stop dragging yourself!"); return 1; }
if(DragOff[giveplayerid] > 0)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s stopped dragging you.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* You stopped dragging %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
TogglePlayerControllable(giveplayerid, 1);
DragOff[giveplayerid] = 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player isn't being dragged !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is not near you !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not a Cop / FBI / Navy / National Guard !");
}
}//not connected
return 1;
}
Код:
(55467) : error 017: undefined symbol "giveplayerid" (55472) : warning 217: loose indentation (55474) : error 017: undefined symbol "DragOff" (55474) : error 017: undefined symbol "giveplayerid" (55474) : error 029: invalid expression, (55474) : fatal error 107: too many error messages on one line