[Help] I'm new
#4

Quote:
Originally Posted by blasycia09
I throw good warnings

LosMafiosos.pwn(1811) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

here code:

SpamStrings[playerid] ++;
if(SpamStrings[playerid] >= MAX_SPAM)
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
SendClientMessage(playerid,0xCC0000AA,"Please wait 20 seconds before the spam again (spam protection).");
return 0;
}


help..
maybe...

pawn Код:
SpamStrings[playerid] ++;
    if(SpamStrings[playerid] >= MAX_SPAM)
    {
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        SendClientMessage(playerid,0xCC0000AA,"Please wait 20 seconds before the spam again (spam protection).");
            return 0;
    }
but erm, why are you getting the players name? your not using it.

maybe

pawn Код:
SpamStrings[playerid] ++;
    if(SpamStrings[playerid] >= MAX_SPAM)
    {
    new pName[MAX_PLAYER_NAME], string[64];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(string, sizeof(string), "%s was muted for 20 seconds (spam protection)", pName);
    SendClientMessageToAll(0xCC0000AA, string);
    return 0;
    }
Reply


Messages In This Thread
[Help] I'm new - by blasycia09 - 28.02.2009, 06:02
Re: [Help] I'm new - by Nimphious - 28.02.2009, 06:05
Re: [Help] I'm new - by blasycia09 - 28.02.2009, 06:11
Re: [Help] I'm new - by Nimphious - 28.02.2009, 06:49
Re: [Help] I'm new - by blasycia09 - 28.02.2009, 11:51
Re: [Help] I'm new - by Nimphious - 28.02.2009, 17:33
Re: [Help] I'm new - by blasycia09 - 28.02.2009, 18:00
Re: [Help] I'm new - by Nimphious - 28.02.2009, 18:27

Forum Jump:


Users browsing this thread: 8 Guest(s)