Undefinied symbol "geoip_country_ex" - Players_Logger

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
16
Реакции
4
Ошибка
Players_Logger.sma<76> : error 017: undefinied symbol "geoip_country_ex"
Players_Logger.sma<76> : error 088: number of arguments does not match definition
Компилятор
Локальный
Amx Mod X
1.9.0
Исходный код
#include <amxmodx>
#include <amxmisc>
#include <reapi>

// Добавлять к статистике информацию о стране?
#define ADD_COUNTRY

const AUTHID_MAX_LEN = 32;
#if !defined MAX_NAME_LENGTH
const MAX_NAME_LENGTH = 32;
#endif
const MAX_IP_LEN = 22;

new g_szLogsFile[128];

#if defined ADD_COUNTRY
#include <geoip>
#endif

new const g_szAuthType[client_auth_type][] =
{
"NONE", "DPROTO",
"STEAM", "STEAMEMU",
"REVEMU", "OLDREVEMU",
"HLTV", "SC2009",
"AVSMP", "SXEI",
"REVEMU2013", "SSE3"
}

public plugin_precache()
{
register_plugin("Players Logger", "0.1с", "wopox1337");

get_basedir(g_szLogsFile, charsmax(g_szLogsFile));
add(g_szLogsFile, charsmax(g_szLogsFile), "/logs");

/*
//Header
#if defined ADD_COUNTRY
Log_to_csv(g_szLogsFile,
"Name, IP, AuthId, Protocol, AuthType, Country"
);
#else
Log_to_csv(g_szLogsFile,
"Name, IP, AuthId, Protocol, AuthType"
);
#endif
*/
}

public client_authorized(pPlayer)
{
if(is_user_bot(pPlayer))
return;

static
szAuthId[AUTHID_MAX_LEN],

iProtocol,
client_auth_type: AuthType,

#if defined ADD_COUNTRY
szCountry[64],
#endif
szIP[MAX_IP_LEN];

get_user_authid(pPlayer, szAuthId, AUTHID_MAX_LEN - 1);

iProtocol = REU_GetProtocol(pPlayer);
AuthType = REU_GetAuthtype(pPlayer);

// get_user_name(pPlayer, szName, MAX_NAME_LENGTH - 1);
get_user_ip(pPlayer, szIP, MAX_IP_LEN - 1, .without_port = true);

#if defined ADD_COUNTRY
geoip_country_ex(szIP, szCountry, charsmax(szCountry));
if(!szCountry[0]) formatex(szCountry, charsmax(szCountry), "[ UNKNOWN ]");

Log_to_csv(g_szLogsFile, " ,%s, %s, %i, %s, %s",
szIP, szAuthId, iProtocol, g_szAuthType[AuthType], szCountry
);
#else
Log_to_csv(g_szLogsFile, " ,%s, %s, %i, %s",
szIP, szAuthId, iProtocol, g_szAuthType[AuthType]
);
#endif
}

stock Log_to_csv(const szLogsDir[], const Message[], any:...) {
new szMsg[512], szTime[22], szFile[128], pFile;

vformat(szMsg, charsmax(szMsg), Message, 3);
get_time("pl_%Y%m%d.csv", szTime, charsmax(szTime));
formatex(szFile, charsmax(szFile), "%s/%s", szLogsDir, szTime);
// formatex(szFile, charsmax(szFile), "%s/%s", szLogsDir, "STATS.csv");
pFile = fopen(szFile, "at");
fprintf(pFile, "%s^n", szMsg);
fclose(pFile);

// server_print("saved to: '%s'", szFile);
}
В этой теме было размещено решение! Перейти к решению.

Вложения

Сообщения
1,668
Реакции
1,495
Помог
24 раз(а)
Try to update geoip.inc in your include folder (where are you compiling).
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу