Command Problems
#10

Quote:
Originally Posted by Basicz
Посмотреть сообщение
pawn Код:
stock GetName( playerid )
{
    new
        pName[ 24 ]
    ;

    return GetPlayerName( playerid, pName, sizeof pName ), pName;
}

CMD:me(playerid, params[])
{
    if(isnull(params))
        return SendClientMessage(playerid, COLOR_GREY, "SYNTAX:/me [action]");

    new string[128];
    format(string, sizeof(string), "* %s %s", GetName(playerid), params);
    SendNearbyMessage(playerid, COLOR_ME, string);
    return 1;
}
Should works, about "undefined symbol: SendNearbyMessage", you didn't have the function.
pawn Код:
: warning 219: local variable "pName" shadows a variable at a preceding level
: warning 219: local variable "pName" shadows a variable at a preceding level
: warning 219: local variable "pName" shadows a variable at a preceding level
: warning 219: local variable "pName" shadows a variable at a preceding level
: warning 219: local variable "pName" shadows a variable at a preceding level
: warning 219: local variable "pName" shadows a variable at a preceding level
: error 001: expected token: "-identifier-", but found "("
: error 010: invalid function or declaration
: warning 203: symbol is never used: "pName"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
When adding this, This is what I get.
Reply


Messages In This Thread
Command Problems - by Tachibana - 22.06.2011, 15:31
Re: Command Problems - by SILENT! - 22.06.2011, 15:34
Re: Command Problems - by Tachibana - 22.06.2011, 15:36
Re: Command Problems - by SILENT! - 22.06.2011, 15:50
Re: Command Problems - by Tachibana - 22.06.2011, 15:57
Re: Command Problems - by Tachibana - 23.06.2011, 01:42
Re: Command Problems - by PrawkC - 23.06.2011, 01:55
Re: Command Problems - by Tachibana - 23.06.2011, 02:01
Re: Command Problems - by Basicz - 23.06.2011, 02:43
Re: Command Problems - by Tachibana - 23.06.2011, 03:26

Forum Jump:


Users browsing this thread: 2 Guest(s)