08.10.2013, 18:44
So, when my gamemode starts it loads the Bans from MySql, and I can check that it starts loading in the server log, but it never loads. And also the gamemode doesn't load afterwards, the gamemode is set to "Unknown".
Here is the LoadBans code:
And here is the server log:
Here is the LoadBans code:
pawn Код:
forward LoadBans();
public LoadBans()
{
new arrCoords[4][64];
new row[256];
new string[64];
new idx;
printf("[MYSQL]: Loading bans from MYSQL (from %s).", SQL_DB);
while (idx < sizeof(BanInfo))
{
format(string, sizeof(string), "SELECT * FROM `bans` WHERE `ID` = %d", idx);
mysql_query_ex(string);
mysql_store_result();
if(mysql_num_rows() > 0)
{
mysql_fetch_row(row);
split(row, arrCoords, '|');
mysql_free_result();
strmid(BanInfo[idx][BanInfoIP], arrCoords[1], 0, strlen(arrCoords[1]), 19);
BanInfo[idx][BanInfoTS] = strval(arrCoords[2]);
strmid(BanInfo[idx][BanInfoReason], arrCoords[3], 0, strlen(arrCoords[3]), 128);
}
else
{
BanInfo[idx][BanInfoTS]=0;
}
if(BanInfo[idx][BanInfoTS]>getdate())
{
BanInfo[idx][BanInfoActive]=1;
}
mysql_free_result();
idx++;
}
printf("[MYSQL]: Bans loaded from MYSQL (from %s).", SQL_DB);
return 1;
}
Код:
Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3x-R2, ©2005-2013 SA-MP Team [21:52:20] [21:52:20] Server Plugins [21:52:20] -------------- [21:52:20] Loading plugin: nativechecker.so [21:52:20] Loaded. [21:52:20] Loading plugin: mysql.so [21:52:20] >> plugin.mysql: R34 successfully loaded. [21:52:20] Loaded. [21:52:20] Loading plugin: streamer.so [21:52:20] *** Streamer Plugin v2.6.1 by Incognito loaded *** [21:52:20] Loaded. [21:52:20] Loading plugin: sscanf.so [21:52:20] [21:52:20] =============================== [21:52:20] sscanf plugin loaded. [21:52:20] Version: 2.8.1 [21:52:20] © 2012 Alex "******" Cole [21:52:20] =============================== [21:52:20] Loaded. [21:52:20] Loaded 4 plugins. [21:52:20] [21:52:20] Filterscripts [21:52:20] --------------- [21:52:20] Loaded 0 filterscripts. [21:52:20] Error: Function not registered: 'cache_get_row_count' [21:52:20] Error: Function not registered: 'cache_get_field_content' [21:52:20] Error: Function not registered: 'cache_get_field_count' [21:52:20] Error: Function not registered: 'cache_get_row' [21:52:20] Error: Function not registered: 'Streamer_CallbackHook' [21:52:20] Error: Function not registered: 'SSCANF_Init' [21:52:20] Error: Function not registered: 'SSCANF_Join' [21:52:20] Error: Function not registered: 'SSCANF_Leave' [21:52:20] Error: Function not registered: 'mysql_escape_string' [21:52:20] Error: Function not registered: 'mysql_connect' [21:52:20] Error: Function not registered: 'mysql_log' [21:52:20] Error: Function not registered: 'CreateDynamicPickup' [21:52:20] Error: Function not registered: 'CreateDynamic3DTextLabel' [21:52:20] Error: Function not registered: 'CreateDynamicObject' [21:52:20] Error: Function not registered: 'DestroyDynamicObject' [21:52:20] Error: Function not registered: 'sscanf' [21:52:20] Error: Function not registered: 'UpdateDynamic3DTextLabelText' [21:52:20] Error: Function not registered: 'DestroyDynamic3DTextLabel' [21:52:20] Error: Function not registered: 'DestroyDynamicPickup' [21:52:20] [21:52:20] ======================================= [21:52:20] | | [21:52:20] | YSI version 1.03.0011 | [21:52:20] | By Alex "******" Cole | [21:52:20] | | [21:52:20] | Checking the latest YSI version.. | [21:52:20] | | [21:52:20] ======================================= [21:52:20] [21:52:20] [MYSQL]: Loading bans from MYSQL (from samp). [21:52:20] EL-RP [21:52:20] Number of vehicle models: 0 [21:52:21] [21:52:21] ========================================== [21:52:21] | | [21:52:21] | A new version (v3.09.0684) of YSI is | [21:52:21] | available from: | [21:52:21] | | [21:52:21] | www.y-less.com/YSI/YSI_1.0.zip | [21:52:21] | | [21:52:21] | Changelog: | [21:52:21] | | [21:52:21] | 1.04.0000: | [21:52:21] | | [21:52:21] | RC 1 for YSI 3.0. Available from: | [21:52:21] | http://www.y-less.com/YSI/YSI_3.0.rar | [21:52:21] | - includes MANY new libraries and | [21:52:21] | fixes, see | [21:52:21] | http://forum.sa-mp.com/showthread.php? | [21:52:21] | p=1425938 for more information, with | [21:52:21] | more topics and updates due over the | [21:52:21] | next few weeks. In brief: Added | [21:52:21] | "y_inline", "y_text", "y_users", | [21:52:21] | "y_uvar", "y_svar", "y_remote"; | [21:52:21] | updated "y_timers", "y_iter"; MANY | [21:52:21] | MANY fixes and tweaks in almost every | [21:52:21] | other library. | [21:52:21] | | [21:52:21] | 3.00.0000: | [21:52:21] | | [21:52:21] | YSI 3.0 released! Now includes the | [21:52:21] | "y_text" library for better messages, | [21:52:21] | and a reworked "y_classes" library. | [21:52:21] | Largely documented here | [21:52:21] | "http://forum.sa-mp.com/showthread.php | [21:52:21] | ?t=321092". | [21:52:21] | | [21:52:21] | 3.01.0002: | [21:52:21] | | [21:52:21] | Small fixes to "y_text" and | [21:52:21] | "y_classes". | [21:52:21] | | [21:52:21] | 3.09.0684: | [21:52:21] | | [21:52:21] | Reverted to old download location. | [21:52:21] | Improved (and fixed) version checks; | [21:52:21] | added y_bitmap, y_areas, y_races, | [21:52:21] | y_zonenames, better documentation; | [21:52:21] | MANY other bug fixes - see the github | [21:52:21] | repository for more details: | [21:52:21] | | [21:52:21] ==========================================