Hello everyone, I've noticed some weird things in my chatlogs I'll display it for better understanding.
This is what comes up in the logs:
It looks like it levels up an ID that is not connected, I kill the timers upon disconnect. There are more of these random level up logs, I just can't find the source of it.
And this is the code:
This is what comes up in the logs:
Code:
[31/05/2017 15:21:24] leveled up (level 282)
And this is the code:
Code:
forward UpdatePlayer(playerid);
public UpdatePlayer(playerid)
{
if(!IsPlayerConnected(playerid)) return 1;
UpdateBars(playerid);
UpdatePlayingTime(playerid);
if(PlayerInfo[playerid][pExp] >= 100)
{
new string[128];
PlayerInfo[playerid][pExp] = 0;
PlayerInfo[playerid][pLevel] ++;
SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
SetProgressBarValue(Exp[playerid], 0);
UpdateProgressBar(Exp[playerid], playerid);
SendClientMessage(playerid, COLOR_ORANGE, "** {FFFFFF}Congratulations, you leveled up!{FF8000} **");
format(string, sizeof(string), "%s leveled up (level %d)", GPN(playerid), PlayerInfo[playerid][pLevel]);
ChatLog(string, "chatlog.txt");
}
return 1;
}