SA-MP Forums Archive
Warning error 202 crap. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Warning error 202 crap. (/showthread.php?tid=330983)



Warning error 202 crap. - Benzke - 03.04.2012

Like , Even If I make any CMD of /me , /o
The same Error Happens , Help me ?



Код:
COMMAND:me(playerid, params[])
{
    new sendername[MAX_PLAYER_NAME];
    new string[128];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(isnull(params)) return SendClientMessage(playerid, 0xFFFF00AA, "[USAGE]: /me [acion]");
    format(string, sizeof(string), "%s %s", sendername, params);
    ProxDetector(10.0, playerid, string, COLOR_LIGHTBLUE);
    return 1;
}
these are the errors :
Код:
C:\Users\Acer\Desktop\Blank Gamemode\gamemodes\Blank.pwn(401) : warning 202: number of arguments does not match definition
C:\Users\Acer\Desktop\Blank Gamemode\gamemodes\Blank.pwn(401) : warning 202: number of arguments does not match definition
C:\Users\Acer\Desktop\Blank Gamemode\gamemodes\Blank.pwn(401) : warning 202: number of arguments does not match definition
C:\Users\Acer\Desktop\Blank Gamemode\gamemodes\Blank.pwn(401) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Warnings.



Re: Warning error 202 crap. - Benzke - 03.04.2012

sry for Double Posting but
Also guys I found this that when I went ingame and did /me test
It restarted the server.


Re: Warning error 202 crap. - JoeyDeBlob - 03.04.2012

try this

Код:
CMD:me(playerid, params[])
{
	if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /me [action]");
	new string[128];
	format(string, sizeof(string), "* %s %s", GetPlayerNameEx(playerid), params);
	ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
	return 1;
}
btw-its not errors, its warnings xD


Re: Warning error 202 crap. - Benzke - 03.04.2012

Код:
C:\Users\Acer\Desktop\Blank Gamemode\gamemodes\Blank.pwn(395) : error 017: undefined symbol "SendClientMessageEx"
C:\Users\Acer\Desktop\Blank Gamemode\gamemodes\Blank.pwn(397) : error 017: undefined symbol "GetPlayerNameEx"
C:\Users\Acer\Desktop\Blank Gamemode\gamemodes\Blank.pwn(398) : error 017: undefined symbol "COLOR_PURPLE"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
These many errors.

EDIT : My Proxdetector not working! Please help me.


Re: Warning error 202 crap. - Mark™ - 03.04.2012

pawn Код:
COMMAND:me(playerid,params[])
{
    // Setup local variables
    new Msg[128], Message[128], Name[24];

    // Send the command to all admins so they can see it
    SendAdminText(playerid, "/me", params);

    // Check if the player has logged in
    if (APlayerData[playerid][LoggedIn] == true)
    {
        if (sscanf(params, "s[128]", Message)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"* Mark™ <action>\"");
        else
        {
            // Check if the player isn't muted
            if (APlayerData[playerid][Muted] == false)
            {
                GetPlayerName(playerid, Name, sizeof(Name));
                format(Msg, sizeof(Msg), "* %s: %s", Name, Message);
                SendClientMessageToAll(0xFFFF00AA, Msg);
            }
            else
                SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}You are still muted");
        }
    }
    else
        return 0;

    // Let the server know that this was a valid command
    return 1;
}



Re: Warning error 202 crap. - Ezay - 03.04.2012

Its Just Warnings,
They Dont Interfere With your Coding(s),

Usally Simply Fixed


Re: Warning error 202 crap. - Reklez - 03.04.2012

Quote:
Originally Posted by Ezay
Посмотреть сообщение
Its Just Warnings,
They Dont Interfere With your Coding(s),

Usally Simply Fixed
You out of mind? don't ignore the warnings they can effect some changes in your server somehow.


Re: Warning error 202 crap. - Unte99 - 03.04.2012

You don't have the colors defined... Do you know what that means ? I guess not. You should read scripting basics first, before even asking around sa-mp.com.

https://sampwiki.blast.hk/wiki/SendClientMessage

https://sampwiki.blast.hk/wiki/GetPlayerName

pawn Код:
#define COLOR_PURPLE yourcolorhexcode