Hey,
So this might look kinda weird, It's my first time to see such a bug tho.. The weather is like blinking or flickering, for example if the weather is night, the sky flashes, gets light then dark in a part of the second, continuously.. So I don't know what is the cause of that, When i restart the server from the control panel it is fixed, but IG continues. |
Some weather ids are bugged i'll confirm that, what is ur weather id?
|
That is very weird, these weather ids didnt bug for me the ones that did were 200+
However, maybeeee its a bug in your code? something making the server heavy perhaps? |
[11:43:19] [debug] #0 00089cd8 in public SecondTimer () from asd.amx [11:43:19] [debug] Run time error 4: "Array index out of bounds" [11:43:19] [debug] Attempted to read/write array element at negative index -1 [11:43:19] [debug] AMX backtrace: [11:43:19] [debug] #0 00089cd8 in public SecondTimer () from asd.amx [11:43:19] [debug] Run time error 4: "Array index out of bounds" [11:43:19] [debug] Attempted to read/write array element at negative index -1 [11:43:19] [debug] AMX backtrace: [11:43:19] [debug] #0 00089cd8 in public SecondTimer () from asd.amx [11:43:20] [debug] Run time error 4: "Array index out of bounds" [11:43:20] [debug] Attempted to read/write array element at negative index -1 [11:43:20] [debug] AMX backtrace: [11:43:20] [debug] #0 00089cd8 in public SecondTimer () from asd.amx [11:43:20] [debug] Run time error 4: "Array index out of bounds" [11:43:20] [debug] Attempted to read/write array element at negative index -1 [11:43:20] [debug] AMX backtrace: [11:43:20] [debug] #0 00089cd8 in public SecondTimer () from asd.amx [11:43:20] [debug] Run time error 4: "Array index out of bounds" [11:43:20] [debug] Attempted to read/write array element at negative index -1 [11:43:20] [debug] AMX backtrace: [11:43:20] [debug] #0 00089cd8 in public SecondTimer () from asd.amx [11:43:20] [debug] Run time error 4: "Array index out of bounds" [11:43:20] [debug] Attempted to read/write array element at negative index -1 [11:43:20] [debug] AMX backtrace: [11:43:20] [debug] #0 00089cd8 in public SecondTimer () from asd.amx [11:43:20] [debug] Run time error 4: "Array index out of bounds" [11:43:20] [debug] Attempted to read/write array element at negative index -1 [11:43:20] [debug] AMX backtrace: [11:43:20] [debug] #0 00089cd8 in public SecondTimer () from asd.amx |
forward SecondTimer();
public SecondTimer()
{
new hour, minute, second, boomboxid, string[128];
gettime(hour, minute, second);
if((gGMX) && mysql_unprocessed_queries(connectionID) == 0)
{
SendRconCommand("gmx");
}
foreach(new i : Player)
{
SetPlayerTime(i, hour, minute);
if(PlayerInfo[i][pLogged] && !PlayerInfo[i][pKicked])
{
AFKCheck(i);
//NOPCheck(i);
if(PlayerInfo[i][pSpamTime] > 0)
{
PlayerInfo[i][pSpamTime]--;
}
if(PlayerInfo[i][pVehicleCount] > 0)
{
PlayerInfo[i][pVehicleCount]--;
}
if(PlayerInfo[i][pMechanicCall] > 0)
{
PlayerInfo[i][pMechanicCall]--;
}
if(PlayerInfo[i][pTaxiCall] > 0)
{
PlayerInfo[i][pTaxiCall]--;
}
if(PlayerInfo[i][pEmergencyCall] > 0)
{
PlayerInfo[i][pEmergencyCall]--;
}
if(PlayerInfo[i][pCourierCooldown] > 0)
{
PlayerInfo[i][pCourierCooldown]--;
}
if(PlayerInfo[i][pPizzaCooldown] > 0)
{
PlayerInfo[i][pPizzaCooldown]--;
}
if(PlayerInfo[i][pDetectiveCooldown] > 0)
{
PlayerInfo[i][pDetectiveCooldown]--;
}
if(PlayerInfo[i][pThiefCooldown] > 0)
{
PlayerInfo[i][pThiefCooldown]--;
}
if(PlayerInfo[i][pCocaineCooldown] > 0)
{
PlayerInfo[i][pCocaineCooldown]--;
}
if(PlayerInfo[i][pACFired] > 0)
{
PlayerInfo[i][pACFired]--;
}
if(PlayerInfo[i][pRapidFire] > 0)
{
PlayerInfo[i][pRapidFire]--;
}
if(PlayerInfo[i][pGodmode] > 0)
{
PlayerInfo[i][pGodmode]--;
}
Great, got some shit on the logs.
PHP код:
|
PlayerInfo[playerid][pGodmode]=gettime()+30*60; //added 30-seconds for example
if(PlayerInfo[playerid][pGodmode]<gettime()){
}
Lets just make sure we know where the problem is coming from,
Take out all of the code (copy it somewhere else) from that function and restart the server to see if the problem presists. |
forward SecondTimer();
public SecondTimer()
{
new hour, minute, boomboxid, string[128];
gettime(hour, minute);
if((gGMX) && mysql_unprocessed_queries(connectionID) == 0)
{
SendRconCommand("gmx");
}
foreach(new i : Player)
{
SetPlayerTime(i, hour, minute);
if(PlayerInfo[i][pLogged] && !PlayerInfo[i][pKicked])
{
AFKCheck(i);
//NOPCheck(i);
if(PlayerInfo[i][pSpamTime] > 0)
{
PlayerInfo[i][pSpamTime]--;
}
if(PlayerInfo[i][pVehicleCount] > 0)
{
PlayerInfo[i][pVehicleCount]--;
}
if(PlayerInfo[i][pMechanicCall] > 0)
{
PlayerInfo[i][pMechanicCall]--;
}
if(PlayerInfo[i][pTaxiCall] > 0)
{
PlayerInfo[i][pTaxiCall]--;
}
if(PlayerInfo[i][pEmergencyCall] > 0)
{
PlayerInfo[i][pEmergencyCall]--;
}
if(PlayerInfo[i][pCourierCooldown] > 0)
{
PlayerInfo[i][pCourierCooldown]--;
}
if(PlayerInfo[i][pPizzaCooldown] > 0)
{
PlayerInfo[i][pPizzaCooldown]--;
}
if(PlayerInfo[i][pDetectiveCooldown] > 0)
{
PlayerInfo[i][pDetectiveCooldown]--;
}
if(PlayerInfo[i][pThiefCooldown] > 0)
{
PlayerInfo[i][pThiefCooldown]--;
}
if(PlayerInfo[i][pCocaineCooldown] > 0)
{
PlayerInfo[i][pCocaineCooldown]--;
}
if(PlayerInfo[i][pACFired] > 0)
{
PlayerInfo[i][pACFired]--;
}
if(PlayerInfo[i][pRapidFire] > 0)
{
PlayerInfo[i][pRapidFire]--;
}
if(PlayerInfo[i][pGodmode] > 0)
{
PlayerInfo[i][pGodmode]--;
}
AFKCheck(playerid)
{
new
Float:x,
Float:y,
Float:z,
Float:cx,
Float:cy,
Float:cz;
GetPlayerPos(playerid, x, y, z);
GetPlayerCameraPos(playerid, cx, cy, cz);
if(PlayerInfo[playerid][pAFKPos][0] == x && PlayerInfo[playerid][pAFKPos][1] == y && PlayerInfo[playerid][pAFKPos][2] == z && PlayerInfo[playerid][pAFKPos][3] == cx && PlayerInfo[playerid][pAFKPos][4] == cy && PlayerInfo[playerid][pAFKPos][5] == cz)
{
PlayerInfo[playerid][pAFKTime]++;
if(!PlayerInfo[playerid][pAFK] && PlayerInfo[playerid][pAFKTime] >= 60)
{
SendClientMessage(playerid, COLOR_LIGHTORANGE, "** You are now marked as {00AA00}Away from keyboard{F7A763} as you haven't moved in one minute.");
//SendClientMessage(i, COLOR_LIGHTRED, "SERVER: You have been marked as AFK as you haven't moved in one minute.");
PlayerInfo[playerid][pAFK] = 1;
}
}
else
{
if(PlayerInfo[playerid][pAFK])
{
if(PlayerInfo[playerid][pAFKTime] < 120) {
//SendClientMessageEx(i, COLOR_LIGHTORANGE, "** You are no longer marked as Away from Keyboard after %i seconds.", PlayerInfo[playerid][pAFKTime]);
SendClientMessageEx(playerid, COLOR_LIGHTRED, "SERVER: You are no longer marked as AFK after %i seconds.", PlayerInfo[playerid][pAFKTime]);
} else if(PlayerInfo[playerid][pAFKTime] >= 120) {
//SendClientMessageEx(i, COLOR_LIGHTORANGE, "** You are no longer marked as Away from Keyboard after %i minutes.", PlayerInfo[playerid][pAFKTime] / 60);
SendClientMessageEx(playerid, COLOR_LIGHTRED, "SERVER: You are no longer marked as AFK after %i minutes.", PlayerInfo[playerid][pAFKTime] / 60);
}
PlayerInfo[playerid][pAFK] = 0;
}
PlayerInfo[playerid][pAFKTime] = 0;
}
PlayerInfo[playerid][pAFKPos][0] = x;
PlayerInfo[playerid][pAFKPos][1] = y;
PlayerInfo[playerid][pAFKPos][2] = z;
PlayerInfo[playerid][pAFKPos][3] = cx;
PlayerInfo[playerid][pAFKPos][4] = cy;
PlayerInfo[playerid][pAFKPos][5] = cz;
}