23.07.2013, 00:18
Okay, so basically, over the past few days some weird issue has arisen. I've updated my YSI library to the latest content (but I still receive the update message, but that's not the issue). So now when I go to load my user files, the server does something weird...
This is my code:
When the player logs in (This part is what crashes, although it isn't the first time the issue occurs):
OnPlayerConnect (This is where it starts happening):
Inside PlayerCheck:
Most Importantly... my LoadUser function...
I can't explain the issue to myself, I can't see what's happening. What I did notice though, was that the statistics were loading in a loop-like sequence.
However, when it got up to 7, it would finish the whole sequence, but then start again from 8?
Example:
Again, I can't explain why this is happening, and I'm wondering whether it's an error from my side or something to do with the YSI update. (Which I doubt) But if you know any reasons as to why this is happening, I would appreciate any help offered.
Код:
[02:16:17] [DEBUG]: (0) Loading Statistics... [1] [02:16:17] [DEBUG]: (0) Loading Statistics... [1] [02:16:17] [DEBUG]: (0) Password Loaded [2] [02:16:17] [DEBUG]: (0) Loading Statistics... [1] [02:16:17] [DEBUG]: (0) Password Loaded [2] [02:16:17] [DEBUG]: (0) Admin Level Loaded [3] [02:16:17] [DEBUG]: (0) Loading Statistics... [1] [02:16:17] [DEBUG]: (0) Password Loaded [2] [02:16:17] [DEBUG]: (0) Admin Level Loaded [3] [02:16:17] [DEBUG]: (0) VIP Level Loaded [4] [02:16:17] [DEBUG]: (0) Loading Statistics... [1] [02:16:17] [DEBUG]: (0) Password Loaded [2] [02:16:17] [DEBUG]: (0) Admin Level Loaded [3] [02:16:17] [DEBUG]: (0) VIP Level Loaded [4] [02:16:17] [DEBUG]: (0) Ban Status Loaded [5] [02:16:17] [DEBUG]: (0) Loading Statistics... [1] [02:16:17] [DEBUG]: (0) Password Loaded [2] [02:16:17] [DEBUG]: (0) Admin Level Loaded [3] [02:16:17] [DEBUG]: (0) VIP Level Loaded [4] [02:16:17] [DEBUG]: (0) Ban Status Loaded [5] [02:16:17] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:17] [DEBUG]: (0) Loading Statistics... [1] [02:16:17] [DEBUG]: (0) Password Loaded [2] [02:16:17] [DEBUG]: (0) Admin Level Loaded [3] [02:16:17] [DEBUG]: (0) VIP Level Loaded [4] [02:16:17] [DEBUG]: (0) Ban Status Loaded [5] [02:16:17] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:17] [DEBUG]: (0) BannedBy Loaded [7] [02:16:17] [DEBUG]: (0) Jail Status Loaded [8] [02:16:17] [DEBUG]: (0) Drift Money Loaded [9] [02:16:17] [DEBUG]: (0) Drift Points Loaded [10] [02:16:17] [DEBUG]: (0) Seconds Loaded [11] [02:16:17] [DEBUG]: (0) House Spawn Loaded [12] [02:16:17] [DEBUG]: (0) Ban Time Loaded [13] [02:16:17] [DEBUG]: (0) All Statistics Loaded [14] [02:16:17] [DEBUG]: (0) Loading Statistics... [1] [02:16:17] [DEBUG]: (0) Password Loaded [2] [02:16:17] [DEBUG]: (0) Admin Level Loaded [3] [02:16:17] [DEBUG]: (0) VIP Level Loaded [4] [02:16:17] [DEBUG]: (0) Ban Status Loaded [5] [02:16:17] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:17] [DEBUG]: (0) BannedBy Loaded [7] [02:16:17] [DEBUG]: (0) Loading Statistics... [1] [02:16:17] [DEBUG]: (0) Password Loaded [2] [02:16:17] [DEBUG]: (0) Admin Level Loaded [3] [02:16:17] [DEBUG]: (0) VIP Level Loaded [4] [02:16:17] [DEBUG]: (0) Ban Status Loaded [5] [02:16:17] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:17] [DEBUG]: (0) BannedBy Loaded [7] [02:16:17] [DEBUG]: (0) Jail Status Loaded [8] [02:16:17] [DEBUG]: (0) Loading Statistics... [1] [02:16:17] [DEBUG]: (0) Password Loaded [2] [02:16:17] [DEBUG]: (0) Admin Level Loaded [3] [02:16:17] [DEBUG]: (0) VIP Level Loaded [4] [02:16:17] [DEBUG]: (0) Ban Status Loaded [5] [02:16:17] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:17] [DEBUG]: (0) BannedBy Loaded [7] [02:16:17] [DEBUG]: (0) Jail Status Loaded [8] [02:16:17] [DEBUG]: (0) Drift Money Loaded [9] [02:16:17] [DEBUG]: (0) Loading Statistics... [1] [02:16:17] [DEBUG]: (0) Password Loaded [2] [02:16:17] [DEBUG]: (0) Admin Level Loaded [3] [02:16:17] [DEBUG]: (0) VIP Level Loaded [4] [02:16:17] [DEBUG]: (0) Ban Status Loaded [5] [02:16:17] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:17] [DEBUG]: (0) BannedBy Loaded [7] [02:16:17] [DEBUG]: (0) Jail Status Loaded [8] [02:16:17] [DEBUG]: (0) Drift Money Loaded [9] [02:16:17] [DEBUG]: (0) Drift Points Loaded [10] [02:16:17] [DEBUG]: (0) Loading Statistics... [1] [02:16:17] [DEBUG]: (0) Password Loaded [2] [02:16:17] [DEBUG]: (0) Admin Level Loaded [3] [02:16:17] [DEBUG]: (0) VIP Level Loaded [4] [02:16:17] [DEBUG]: (0) Ban Status Loaded [5] [02:16:17] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:17] [DEBUG]: (0) BannedBy Loaded [7] [02:16:17] [DEBUG]: (0) Jail Status Loaded [8] [02:16:17] [DEBUG]: (0) Drift Money Loaded [9] [02:16:17] [DEBUG]: (0) Drift Points Loaded [10] [02:16:17] [DEBUG]: (0) Seconds Loaded [11] [02:16:17] [DEBUG]: (0) Loading Statistics... [1] [02:16:17] [DEBUG]: (0) Password Loaded [2] [02:16:17] [DEBUG]: (0) Admin Level Loaded [3] [02:16:17] [DEBUG]: (0) VIP Level Loaded [4] [02:16:17] [DEBUG]: (0) Ban Status Loaded [5] [02:16:17] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:17] [DEBUG]: (0) BannedBy Loaded [7] [02:16:17] [DEBUG]: (0) Jail Status Loaded [8] [02:16:17] [DEBUG]: (0) Drift Money Loaded [9] [02:16:17] [DEBUG]: (0) Drift Points Loaded [10] [02:16:17] [DEBUG]: (0) Seconds Loaded [11] [02:16:17] [DEBUG]: (0) House Spawn Loaded [12] [02:16:17] [1] Passed Stat Reset, opening Dialog [02:16:17] [2] Dialog Opened, awaiting response [02:16:23] [3] Response called, passing validation. [02:16:23] [4] Validation passed, buffering. [02:16:23] [5] Password correct, loading statistics. [02:16:23] [DEBUG]: (0) Loading Statistics... [1] [02:16:23] [DEBUG]: (0) Loading Statistics... [1] [02:16:23] [DEBUG]: (0) Password Loaded [2] [02:16:23] [DEBUG]: (0) Loading Statistics... [1] [02:16:23] [DEBUG]: (0) Password Loaded [2] [02:16:23] [DEBUG]: (0) Admin Level Loaded [3] [02:16:23] [DEBUG]: (0) Loading Statistics... [1] [02:16:23] [DEBUG]: (0) Password Loaded [2] [02:16:23] [DEBUG]: (0) Admin Level Loaded [3] [02:16:23] [DEBUG]: (0) VIP Level Loaded [4] [02:16:23] [DEBUG]: (0) Loading Statistics... [1] [02:16:23] [DEBUG]: (0) Password Loaded [2] [02:16:23] [DEBUG]: (0) Admin Level Loaded [3] [02:16:23] [DEBUG]: (0) VIP Level Loaded [4] [02:16:23] [DEBUG]: (0) Ban Status Loaded [5] [02:16:23] [DEBUG]: (0) Loading Statistics... [1] [02:16:23] [DEBUG]: (0) Password Loaded [2] [02:16:23] [DEBUG]: (0) Admin Level Loaded [3] [02:16:23] [DEBUG]: (0) VIP Level Loaded [4] [02:16:23] [DEBUG]: (0) Ban Status Loaded [5] [02:16:23] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:23] [DEBUG]: (0) Loading Statistics... [1] [02:16:23] [DEBUG]: (0) Password Loaded [2] [02:16:23] [DEBUG]: (0) Admin Level Loaded [3] [02:16:23] [DEBUG]: (0) VIP Level Loaded [4] [02:16:23] [DEBUG]: (0) Ban Status Loaded [5] [02:16:23] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:23] [DEBUG]: (0) BannedBy Loaded [7] [02:16:23] [DEBUG]: (0) Jail Status Loaded [8] [02:16:23] [DEBUG]: (0) Drift Money Loaded [9] [02:16:23] [DEBUG]: (0) Drift Points Loaded [10] [02:16:23] [DEBUG]: (0) Seconds Loaded [11] [02:16:23] [DEBUG]: (0) House Spawn Loaded [12] [02:16:23] [DEBUG]: (0) Ban Time Loaded [13] [02:16:23] [DEBUG]: (0) All Statistics Loaded [14] [02:16:23] [DEBUG]: (0) Loading Statistics... [1] [02:16:23] [DEBUG]: (0) Password Loaded [2] [02:16:23] [DEBUG]: (0) Admin Level Loaded [3] [02:16:23] [DEBUG]: (0) VIP Level Loaded [4] [02:16:23] [DEBUG]: (0) Ban Status Loaded [5] [02:16:23] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:23] [DEBUG]: (0) BannedBy Loaded [7] [02:16:23] [DEBUG]: (0) Loading Statistics... [1] [02:16:23] [DEBUG]: (0) Password Loaded [2] [02:16:23] [DEBUG]: (0) Admin Level Loaded [3] [02:16:23] [DEBUG]: (0) VIP Level Loaded [4] [02:16:23] [DEBUG]: (0) Ban Status Loaded [5] [02:16:23] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:23] [DEBUG]: (0) BannedBy Loaded [7] [02:16:23] [DEBUG]: (0) Jail Status Loaded [8] [02:16:23] [DEBUG]: (0) Loading Statistics... [1] [02:16:23] [DEBUG]: (0) Password Loaded [2] [02:16:23] [DEBUG]: (0) Admin Level Loaded [3] [02:16:23] [DEBUG]: (0) VIP Level Loaded [4] [02:16:23] [DEBUG]: (0) Ban Status Loaded [5] [02:16:23] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:23] [DEBUG]: (0) BannedBy Loaded [7] [02:16:23] [DEBUG]: (0) Jail Status Loaded [8] [02:16:23] [DEBUG]: (0) Drift Money Loaded [9] [02:16:23] [DEBUG]: (0) Loading Statistics... [1] [02:16:23] [DEBUG]: (0) Password Loaded [2] [02:16:23] [DEBUG]: (0) Admin Level Loaded [3] [02:16:23] [DEBUG]: (0) VIP Level Loaded [4] [02:16:23] [DEBUG]: (0) Ban Status Loaded [5] [02:16:23] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:23] [DEBUG]: (0) BannedBy Loaded [7] [02:16:23] [DEBUG]: (0) Jail Status Loaded [8] [02:16:23] [DEBUG]: (0) Drift Money Loaded [9] [02:16:23] [DEBUG]: (0) Drift Points Loaded [10] [02:16:23] [DEBUG]: (0) Loading Statistics... [1] [02:16:23] [DEBUG]: (0) Password Loaded [2] [02:16:23] [DEBUG]: (0) Admin Level Loaded [3] [02:16:23] [DEBUG]: (0) VIP Level Loaded [4] [02:16:23] [DEBUG]: (0) Ban Status Loaded [5] [02:16:23] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:23] [DEBUG]: (0) BannedBy Loaded [7] [02:16:23] [DEBUG]: (0) Jail Status Loaded [8] [02:16:23] [DEBUG]: (0) Drift Money Loaded [9] [02:16:23] [DEBUG]: (0) Drift Points Loaded [10] [02:16:23] [DEBUG]: (0) Seconds Loaded [11] [02:16:23] [DEBUG]: (0) Loading Statistics... [1] [02:16:23] [DEBUG]: (0) Password Loaded [2] [02:16:23] [DEBUG]: (0) Admin Level Loaded [3] [02:16:23] [DEBUG]: (0) VIP Level Loaded [4] [02:16:23] [DEBUG]: (0) Ban Status Loaded [5] [02:16:23] [DEBUG]: (0) Ban Reason Loaded [6] [02:16:23] [DEBUG]: (0) BannedBy Loaded [7] [02:16:23] [DEBUG]: (0) Jail Status Loaded [8] [02:16:23] [DEBUG]: (0) Drift Money Loaded [9] [02:16:23] [DEBUG]: (0) Drift Points Loaded [10] [02:16:23] [DEBUG]: (0) Seconds Loaded [11] [02:16:23] [DEBUG]: (0) House Spawn Loaded [12] [02:16:23] [debug] Server crashed while executing newdriftfs.amx [02:16:23] [debug] AMX backtrace: [02:16:23] [debug] #0 00000034 in Debug_Print0 (... <13 variable arguments>) at H:\Scripting\pawno\include\float.inc:108 [02:16:23] [debug] #1 00000034 in Debug_Print0 (... <478150656 variable arguments>) at H:\Scripting\pawno\include\float.inc:108 [02:16:23] [debug] System backtrace:
When the player logs in (This part is what crashes, although it isn't the first time the issue occurs):
pawn Код:
if(strcmp(buf, PlayerInfo[playerid][pPass], false) == 0)
{
print("[5] Password correct, loading statistics.");
INI_ParseFile(UserPath(playerid), "LoadUser_%s", false, true, playerid); //etc...
pawn Код:
PlayerCheck(playerid);
ResetPlayerStats(playerid);
if(!fexist(UserPath(playerid))) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"{FFFFFF}Register","{FFFFFF}You Are {FF0000}Not {FFFFFF}Registered - Please Register","Register","Quit");
print("[1] Passed Stat Reset, opening Dialog");
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"{FFFFFF}Security Login","{FFFFFF}You Are {80FF00}Registered {FFFFFF}Please Type Your Password Below To Login","Login","Quit");
print("[2] Dialog Opened, awaiting response");
pawn Код:
esetSuspendInfo(playerid);
INI_ParseFile(UserPath(playerid), "LoadUser_%s", false, true, playerid);
pawn Код:
forward LoadUser_data(playerid, name[], value[]);
public LoadUser_data(playerid, name[], value[])
{
printf("[DEBUG]: (%d) Loading Statistics... [1]", playerid);
INI_String("Password", PlayerInfo[playerid][pPass], 129);
printf("[DEBUG]: (%d) Password Loaded [2]", playerid);
INI_Int("AdminLevel", PlayerInfo[playerid][aLevel]);
printf("[DEBUG]: (%d) Admin Level Loaded [3]", playerid);
INI_Int("VIPLevel", PlayerInfo[playerid][vLevel]);
printf("[DEBUG]: (%d) VIP Level Loaded [4]", playerid);
INI_Int("Banned", PlayerInfo[playerid][Banned]);
printf("[DEBUG]: (%d) Ban Status Loaded [5]", playerid);
INI_String("BanReason", PlayerInfo[playerid][BanReason], 80);
printf("[DEBUG]: (%d) Ban Reason Loaded [6]", playerid);
INI_String("BannedBy", PlayerInfo[playerid][BannedBy], 24);
printf("[DEBUG]: (%d) BannedBy Loaded [7]", playerid);
INI_Int("Jailed", PlayerInfo[playerid][Jailed]);
printf("[DEBUG]: (%d) Jail Status Loaded [8]", playerid);
INI_Int("Money", PlayerInfo[playerid][DriftMoney]);
printf("[DEBUG]: (%d) Drift Money Loaded [9]", playerid);
INI_Int("Points", PlayerInfo[playerid][DriftPoints]);
printf("[DEBUG]: (%d) Drift Points Loaded [10]", playerid);
INI_Int("Seconds", PlayerInfo[playerid][SecondsLogged]);
printf("[DEBUG]: (%d) Seconds Loaded [11]", playerid);
INI_Int("HouseSpawn", PlayerInfo[playerid][HouseSpawn]);
printf("[DEBUG]: (%d) House Spawn Loaded [12]", playerid);
INI_Int("BanTime", PlayerInfo[playerid][BanTime]);
printf("[DEBUG]: (%d) Ban Time Loaded [13]", playerid);
printf("[DEBUG]: (%d) All Statistics Loaded [14]", playerid);
return 1;
}
Код:
1 (restart), 1 + 2 (restart), 1 + 2 + 3 (restart), 1 + 2 + 3 + 4 (restart), 1 + 2 + 3 + 4 + 5 (restart), etc.
Example:
Код:
1 + 2 + 3 + 4 + 5 + 6 (restart), 1 + 2 + 3 + 4 + 5 + 6 +7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 (finished, restart), 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 (restart), etc.