Slap command help
#1

Hello, I'm getting loads of warnings as I attempt to make a slap command. Help would be highly appriciated!

pawn Код:
CMD:slap(playerid, params[])
{
    new id, string[128], Float: PPos[3], reason[128];
    if(PlayerInfo[playerid][Level] < 1) return SendClientMessage(playerid, 0xF69521AA, "You can't use this command!");//Checking if the player has admin level 1, if not it sends him a message.
    if(sscanf(params,"us[128]",id, reason)) return SendClientMessage(playerid, 0xa10000,"USAGE: /slap [playerid/partofname] [reason]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xF69521AA,"The specified player is currently not connected!");//Checking if the selected user is connected or not.

    GetPlayerPos(id, PPos[0], PPos[1], PPos[2]);
    SetPlayerPos(id, PPos[0], PPos[1], PPos[2]+4);

    new GetName[MAX_PLAYER_NAME]
    GetPlayerName(playerid, GetName, sizeof(GetName));
    format(string, sizeof(string), "You have successfully slapped %s!", GetName(id));
    SendClientMessage(playerid, -1, string);
    return 1;
}
pawn Код:
C:\Users\vasu\Desktop\Sa-Mp Roleplay Serv\gamemodes\Roleplay.pwn(1219) : warning 219: local variable "GetName" shadows a variable at a preceding level
C:\Users\vasu\Desktop\Sa-Mp Roleplay Serv\gamemodes\Roleplay.pwn(1220) : error 001: expected token: ";", but found "-identifier-"
C:\Users\vasu\Desktop\Sa-Mp Roleplay Serv\gamemodes\Roleplay.pwn(1221) : error 012: invalid function call, not a valid address
C:\Users\vasu\Desktop\Sa-Mp Roleplay Serv\gamemodes\Roleplay.pwn(1221) : warning 215: expression has no effect
C:\Users\vasu\Desktop\Sa-Mp Roleplay Serv\gamemodes\Roleplay.pwn(1221) : error 001: expected token: ";", but found ")"
C:\Users\vasu\Desktop\Sa-Mp Roleplay Serv\gamemodes\Roleplay.pwn(1221) : error 029: invalid expression, assumed zero
C:\Users\vasu\Desktop\Sa-Mp Roleplay Serv\gamemodes\Roleplay.pwn(1221) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Reply


Messages In This Thread
Slap command help - by Vasu99 - 02.03.2014, 18:58
Re: Slap command help - by Brandon_More - 02.03.2014, 19:01
Re: Slap command help - by jakejohnsonusa - 02.03.2014, 19:05
Re: Slap command help - by Vasu99 - 02.03.2014, 19:10
Re: Slap command help - by jakejohnsonusa - 02.03.2014, 19:16
Re: Slap command help - by Vasu99 - 02.03.2014, 19:18
Re: Slap command help - by Konstantinos - 02.03.2014, 19:41
Re: Slap command help - by jakejohnsonusa - 02.03.2014, 19:42
Re: Slap command help - by Vasu99 - 02.03.2014, 19:42
AW: Slap command help - by ZaakWest - 02.03.2014, 19:44

Forum Jump:


Users browsing this thread: 1 Guest(s)