KickBan Error, please help me
#1

D:\Program Files\GM'S SACADAS DE SAMP\Convertir a ZOMBIE SURVIVAL\Windows Version [0.3.7]\gamemodes\zma4.pwn(26) : fatal error 100: cannot read from file: "KickBan"

How do I fix it? Please I need your help.
Reply
#2

I already have the .inc file placed in pawno/include but I do not know what happens please I need your help guys.
Reply
#3

Show the code.
Reply
#4

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
Show the code.
Code of the archive KickBan.inc





/*
* KickBan.inc - Hooks Kick() and Ban() to show the messages properly.
* Created by Emmet on Wednesday, June 5, 2013 @ 1:52 AM.
*/
#include <a_samp>

new
bool:g_DelayAction[MAX_PLAYERS char],
g_BanReason[MAX_PLAYERS][128 char];

stock _Kick(playerid) {
if (IsPlayerConnected(playerid)) {
g_DelayAction{playerid} = true;
SetTimerEx("DelayAction", 60, false, "ii", playerid, 1);
}
return 1;
}

stock _Ban(playerid) {
if (IsPlayerConnected(playerid)) {
g_DelayAction{playerid} = true;
SetTimerEx("DelayAction", 60, false, "ii", playerid, 2);
}
return 1;
}

stock _BanEx(playerid, const reason[]) {
if (IsPlayerConnected(playerid)) {
g_DelayAction{playerid} = true;
strpack(g_BanReason[playerid], reason);
SetTimerEx("DelayAction", 60, false, "ii", playerid, 3);
}
return 1;
}

forward DelayAction(playerid, action);
public DelayAction(playerid, action) {
if (!IsPlayerConnected(playerid))
return g_DelayAction{playerid} = false;

else {
if (g_DelayAction{playerid}) {
g_DelayAction{playerid} = false;
switch (action) {
case 1: {
Kick( playerid );
}
case 2: {
Ban( playerid );
}
case 3: {
new reason[128];
strunpack(reason, g_BanReason[playerid]);
BanEx( playerid, reason );
g_BanReason[playerid]{0} = '\0';
}
default: return 0;
}
return 1;
}
}
return 0;
}

#define Kick _Kick
#define Ban _Ban
#define BanEx _BanEx
Reply
#5

Here I will show you some code and images, please help me who know.

Images of pawno/include and of the gamemode:

Image of pawno/include











Image of the Gamemode






Code KickBan.inc

Код:
/*
 *  KickBan.inc - Hooks Kick() and Ban() to show the messages properly.
 *  Created by Emmet on Wednesday, June 5, 2013 @ 1:52 AM.
*/
#include <a_samp>

new
    bool:g_DelayAction[MAX_PLAYERS char],
    g_BanReason[MAX_PLAYERS][128 char];

stock _Kick(playerid) {
    if (IsPlayerConnected(playerid)) {
        g_DelayAction{playerid} = true;
        SetTimerEx("DelayAction", 60, false, "ii", playerid, 1);
    }
    return 1;
}

stock _Ban(playerid) {
    if (IsPlayerConnected(playerid)) {
        g_DelayAction{playerid} = true;
        SetTimerEx("DelayAction", 60, false, "ii", playerid, 2);
    }
    return 1;
}

stock _BanEx(playerid, const reason[]) {
    if (IsPlayerConnected(playerid)) {
        g_DelayAction{playerid} = true;
        strpack(g_BanReason[playerid], reason);
        SetTimerEx("DelayAction", 60, false, "ii", playerid, 3);
    }
    return 1;
}

forward DelayAction(playerid, action);
public DelayAction(playerid, action) {
    if (!IsPlayerConnected(playerid))
        return g_DelayAction{playerid} = false;
   
    else {
        if (g_DelayAction{playerid}) {
            g_DelayAction{playerid} = false;
            switch (action) {
                case 1: {
                    Kick( playerid );
                }
                case 2: {
                    Ban( playerid );
                }
                case 3: {
                    new reason[128];
                    strunpack(reason, g_BanReason[playerid]);
                    BanEx( playerid, reason );
                    g_BanReason[playerid]{0} = '\0';
                }
                default: return 0;
            }
            return 1;
        }
    }
    return 0;
}

#define Kick _Kick
#define Ban _Ban
#define BanEx _BanEx
Reply
#6

Retracted. Misread the image.
Reply
#7

Done, But it does not work: c.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)