Errors with newbie channel
#1

Hi
i just wanted to do /newb channel but i got errors
pawn Код:
if(strcmp(cmdtext, "/n", true)==0)
{
    SendClientMessage(playerid, COLOR_GREY, "The (/n)ewbie chat has been renamed to (/newb)ie!");
    return 1;
}

if(strcmp(cmdtext, "/newb", true)==0)
{
    if(gPlayerLogged{playerid} == 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "You're not logged in.");
        return 1;
    }
    if(PlayerInfo[playerid][pTut] == 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
        return 1;
    }
    if ((nonewbie) && PlayerInfo[playerid][pAdmin] < 2)
    {
        SendClientMessage(playerid, COLOR_GRAD2, "The newbie chat channel has been disabled by an administrator!");
        return 1;
    }
    if(PlayerInfo[playerid][pNMute] == 1)
    {
        SendClientMessage(playerid, COLOR_GREY, "You are muted from the newbie chat channel.");
        return 1;
    }
    new string[128];
    if(NewbieTimer[playerid] > 0)
    {
        format(string, sizeof(string), "You must wait %d seconds before speaking again in this channel.", NewbieTimer[playerid]);
        SendClientMessage(playerid, COLOR_GREY, string);
        return 1;
    }
    if(gNewbie[playerid]==1)
    {
        SendClientMessage(playerid, COLOR_GREY, "You have the channel toggled, /tognewbie to re-enable!");
        return 1;
    }

    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/newb)ie [text]");

    if(PlayerInfo[playerid][pHelper]<1&&PlayerInfo[playerid][pAdmin] < 2)
    {
        NewbieTimer[playerid] = 50;
    }
    else if(PlayerInfo[playerid][pHelper]==1&&PlayerInfo[playerid][pAdmin] < 2)
    {
        NewbieTimer[playerid] = 30;
    }
    else if(PlayerInfo[playerid][pAdmin] == 1)
    {
        NewbieTimer[playerid] = 30;
    }
    else if(PlayerInfo[playerid][pHelper]>=2&&PlayerInfo[playerid][pAdmin] < 2)
    {
        NewbieTimer[playerid] = 10;
    }
    if(PlayerInfo[playerid][pHelper]<1&&PlayerInfo[playerid][pAdmin]<1)
    {
        format(string, sizeof(string), "** Newbie %s: %s", GetPlayerNameEx(playerid), params);
    }
    if(PlayerInfo[playerid][pHelper] == 1&& PlayerInfo[playerid][pAdmin]<2)
    {
        format(string, sizeof(string), "** Helper %s: %s", GetPlayerNameEx(playerid), params);
        AddCAReportToken(playerid); // Advisor Tokens
    }
    if(PlayerInfo[playerid][pAdmin] == 1)
    {
        format(string, sizeof(string), "** Moderator %s: %s", GetPlayerNameEx(playerid), params);
    }
    if(PlayerInfo[playerid][pHelper] == 2&&PlayerInfo[playerid][pAdmin]<2)
    {
        format(string, sizeof(string), "** Community Advisor %s: %s", GetPlayerNameEx(playerid), params);
    }
    if(PlayerInfo[playerid][pHelper] == 3&&PlayerInfo[playerid][pAdmin]<2)
    {
        format(string, sizeof(string), "** Senior Advisor %s: %s", GetPlayerNameEx(playerid), params);
    }
    if(PlayerInfo[playerid][pHelper] >= 4&&PlayerInfo[playerid][pAdmin]<2)
    {
        format(string, sizeof(string), "** Chief Advisor %s: %s", GetPlayerNameEx(playerid), params);
    }
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
        format(string, sizeof(string), "** Admin %s: %s", GetPlayerNameEx(playerid), params);
    }
    foreach(Player, n)
    {
        if (gNewbie[n]==0)
        {
            SendClientMessage(n, COLOR_NEWBIE, string);
        }
    }
    return 1;
errors:
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(13605) : error 017: undefined symbol "nonewbie"
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(13610) : error 017: undefined symbol "pNMute"
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(13615) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(13616) : error 017: undefined symbol "NewbieTimer"
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(13616) : warning 215: expression has no effect
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(13616) : error 001: expected token: ";", but found "]"
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(13616) : error 029: invalid expression, assumed zero
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(13616) : fatal error 107: too many error messages on one line
It's a GF Gamemod
Reply


Messages In This Thread
Errors with newbie channel - by Chris_Morrison - 25.08.2011, 17:48
Re: Errors with newbie channel - by =WoR=G4M3Ov3r - 25.08.2011, 17:50
Re: Errors with newbie channel - by uprp - 25.08.2011, 17:51
Re: Errors with newbie channel - by Jafet_Macario - 25.08.2011, 17:57
Re: Errors with newbie channel - by Chris_Morrison - 25.08.2011, 17:59
Re: Errors with newbie channel - by =WoR=G4M3Ov3r - 25.08.2011, 18:01
Re: Errors with newbie channel - by [MWR]Blood - 25.08.2011, 18:04

Forum Jump:


Users browsing this thread: 1 Guest(s)