6 Erros..
#1

pawn Код:
C:\Users\Khan_vb\Desktop\Server.UFS\XRS\gamemodes\XSE.pwn(1395) : error 010: invalid function or declaration
C:\Users\Khan_vb\Desktop\Server.UFS\XRS\gamemodes\XSE.pwn(1400) : error 010: invalid function or declaration
C:\Users\Khan_vb\Desktop\Server.UFS\XRS\gamemodes\XSE.pwn(1402) : error 010: invalid function or declaration
C:\Users\Khan_vb\Desktop\Server.UFS\XRS\gamemodes\XSE.pwn(1406) : error 010: invalid function or declaration
C:\Users\Khan_vb\Desktop\Server.UFS\XRS\gamemodes\XSE.pwn(1407) : error 010: invalid function or declaration
C:\Users\Khan_vb\Desktop\Server.UFS\XRS\gamemodes\XSE.pwn(1412) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.

pawn Код:
//==============================================================================
//OnPlayerDeath
//==============================================================================
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid == playerid) return 1; // They either fell, or took self-inflicted damage somehow.
new string[75];
format(string, sizeof(string), "You have killed %s.", GetName(playerid));
SendClientMessage(killerid, -1, string);
format(string, sizeof(string), "You have been killed by %s.", GetName(killerid));
SendClientMessage(playerid, -1, string);

    //--------------------------------------------------------------------------
    //Settings & Others
    //--------------------------------------------------------------------------
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerWantedLevel(playerid, 0);
    SendDeathMessage(killerid, playerid, reason);
    if(killerid != INVALID_PLAYER_ID)
    {
        SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
    }
    GivePlayerMoney(killerid, 100);
    GivePlayerMoney(playerid, 0);
    //--------------------------------------------------------------------------
    //Textdraw's Hide/Show
    //--------------------------------------------------------------------------
    TextDrawShowForPlayer(playerid, Textdraw27);
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    //TextDrawHideForPlayer(playerid, Textdraw0);
    //TextDrawHideForPlayer(playerid, Textdraw4);
    //TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw7);
    TextDrawHideForPlayer(playerid, Textdraw8);
    TextDrawHideForPlayer(playerid, Textdraw81);
    TextDrawHideForPlayer(playerid, Textdraw82);
    TextDrawHideForPlayer(playerid, Textdraw83);
    TextDrawHideForPlayer(playerid, Textdraw84);
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    TextDrawHideForPlayer(playerid, TeleTD1);
    TextDrawHideForPlayer(playerid, TeleTD2);
    TextDrawHideForPlayer(playerid, TeleTD3);
        return 1;
}
stock GetName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
    //===============================Anti-Flood=================================
    if(XDeaths[playerid] == 0) // ERROR LINE
    {
       LastDeath[playerid] = gettime();
    }
    XDeaths[playerid]++;
    if(XDeaths[playerid] == 5) // ERROR LINE
    {
        if((gettime() - LastDeath[playerid]) <= 5) // ERROR LINE
        {
            SendClientMessage(playerid,0,"{0066CC}U{FFFF00}F{FF0000}S{AFAFAF}: {15FF00}You have been banned, {12FFFF}for flood{15FF00}check {12FFFF}www.ufs.createaforum.com");
            BanEx(playerid,"Banned for FakeKill Flood");
        }else // ERROR LINE
        if((gettime() - LastDeath[playerid]) > 5) // ERROR LINE
        {
            XDeaths[playerid]=0;
        }
    }
    return 1; // ERROR LINE
}
Reply
#2

Can you show us line numbers?
Reply
#3

Show me the following lines:
Код:
(1395)
(1400)
(1402)
(1406)
(1407)
(1412)
It's easier if you use PAWN tags to show your code.
Код:
[.PAWN][./PAWN] //without the dots!
Reply
#4

I edit the topic and see in the code // ERROR LINE
Reply
#5

To which public does this belong?

pawn Код:
if(XDeaths[playerid] == 0) // ERROR LINE
    {
       LastDeath[playerid] = gettime();
    }
    XDeaths[playerid]++;
    if(XDeaths[playerid] == 5) // ERROR LINE
    {
        if((gettime() - LastDeath[playerid]) <= 5) // ERROR LINE
        {
            SendClientMessage(playerid,0,"{0066CC}U{FFFF00}F{FF0000}S{AFAFAF}: {15FF00}You have been banned, {12FFFF}for flood{15FF00}check {12FFFF}www.ufs.createaforum.com");
            BanEx(playerid,"Banned for FakeKill Flood");
        }else // ERROR LINE
        if((gettime() - LastDeath[playerid]) > 5) // ERROR LINE
        {
            XDeaths[playerid]=0;
        }
    }
    return 1; // ERROR LINE
}
If it belongs to OnPlayerDeath, they're not connected as in.. You closed the bracket before the stock.

Try this:

pawn Код:
//==============================================================================
//OnPlayerDeath
//==============================================================================
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid == playerid) return 1; // They either fell, or took self-inflicted damage somehow.
    new string[75];
    format(string, sizeof(string), "You have killed %s.", GetName(playerid));
    SendClientMessage(killerid, -1, string);
    format(string, sizeof(string), "You have been killed by %s.", GetName(killerid));
    SendClientMessage(playerid, -1, string);

    //--------------------------------------------------------------------------
    //Settings & Others
    //--------------------------------------------------------------------------
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerWantedLevel(playerid, 0);
    SendDeathMessage(killerid, playerid, reason);
    if(killerid != INVALID_PLAYER_ID)
    {
        SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
    }
    GivePlayerMoney(killerid, 100);
    GivePlayerMoney(playerid, 0);
    //--------------------------------------------------------------------------
    //Textdraw's Hide/Show
    //--------------------------------------------------------------------------
    TextDrawShowForPlayer(playerid, Textdraw27);
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    //TextDrawHideForPlayer(playerid, Textdraw0);
    //TextDrawHideForPlayer(playerid, Textdraw4);
    //TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw7);
    TextDrawHideForPlayer(playerid, Textdraw8);
    TextDrawHideForPlayer(playerid, Textdraw81);
    TextDrawHideForPlayer(playerid, Textdraw82);
    TextDrawHideForPlayer(playerid, Textdraw83);
    TextDrawHideForPlayer(playerid, Textdraw84);
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    TextDrawHideForPlayer(playerid, TeleTD1);
    TextDrawHideForPlayer(playerid, TeleTD2);
    TextDrawHideForPlayer(playerid, TeleTD3);
    //===============================Anti-Flood=================================
    if(XDeaths[playerid] == 0)
    {
       LastDeath[playerid] = gettime();
    }
    XDeaths[playerid]++;
    if(XDeaths[playerid] == 5)
    {
        if((gettime() - LastDeath[playerid]) <= 5)
        {
            SendClientMessage(playerid,0,"{0066CC}U{FFFF00}F{FF0000}S{AFAFAF}: {15FF00}You have been banned, {12FFFF}for flood{15FF00}check {12FFFF}www.ufs.createaforum.com");
            BanEx(playerid,"Banned for FakeKill Flood");
        }
        else
        {
            if((gettime() - LastDeath[playerid]) > 5)
            {
                XDeaths[playerid]=0;
            }
        }
    }
    return 1;
}
stock GetName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
Reply
#6

Do you have
new XDeaths[MAX_PLAYERS];
and
new LastDeath[PLAYERS];
On top of your script?
Reply
#7

Thanks you both +REP
Bible your codes worked
pawn Код:
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)