• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Long callback execution detected (hang or performance issue)
#1
Hi guys



My crash detect log is full with this error



Code:
Long callback execution detected (hang or performance issue)

AMX backtrace:

#0 0082299c in public WoodGrowing () at



(every one minute)

This is a timer that starts every 60 seconds with a loop





Code:
for(new i; i < 2000; i)



I just need to have this loop. How I can improve it to avoid the error.







PHP Code:
#define MAX_WOOD 2000

enum Wood

{

dIDImanja,

Float:dWoodX,

Float:dWoodY,

Float:dWoodZ,

dTime,

dPostavljeno,

dObjd,

dText,

dVrsta,

dHour,

dMin,

dWood,

dProsloMinuta,

dProsloSat,

dUkradeno

};

new 
DI[MAX_WOOD][Wood];

forward WoodGrowing();

public 
WoodGrowing()

{

new 
stringv[128];

new 
vrsta[10];

for(new 
isizeof(DI); i)

{

if(
DI[i][dPostavljeno] == 1)

{

if(
DI[i][dVrsta] == 1) { vrsta "Sljiva"; }

else if(
DI[i][dVrsta] == 2) { vrsta "Kruska"; }

else if(
DI[i][dVrsta] == 3) { vrsta "Jabuka"; }

if(
DI[i][dHour] >= && DI[i][dMin] >= 1)

{

DI[i][dMin] --;

format(stringv,128,"Voce jos nije izraslo !\nVrijeme do izrastanja: %d sati, %d minuta\nVrsta drveca: %s",DI[i][dHour],DI[i][dMin],vrsta);

UpdateDynamic3DTextLabelText(DrvoLabel[i], -1stringv);

}

else if(
DI[i][dMin] == && DI[i][dHour] >= 1)

{

DI[i][dHour] --;

DI[i][dMin] = 60;

format(stringv,128,"Voce jos nije izraslo !\nVrijeme do izrastanja: %d sati, %d minuta\nVrsta drveca: %s",DI[i][dHour],DI[i][dMin],vrsta);

UpdateDynamic3DTextLabelText(DrvoLabel[i], -1stringv);

}

else if(
DI[i][dHour] == && DI[i][dMin] == 0)

{

format(stringv,128,"Voce je izraslo !\nDa oberes voce kucaj/oberivoce\nVrsta drveca:%s",vrsta);

UpdateDynamic3DTextLabelText(DrvoLabel[i], -1stringv);

if(
DI[i][dProsloSat] >= && DI[i][dProsloMinuta] >= 1DI[i][dProsloMinuta] --;

else if(
DI[i][dProsloMinuta] == && DI[i][dProsloSat] >= 1) {

DI[i][dProsloMinuta] --;

DI[i][dProsloSat] = 60;

}

SaveWood(i);

}

}

}

return 
1;


  Reply


Messages In This Thread
Long callback execution detected (hang or performance issue) - by GospodinX - 2021-03-07, 10:12 AM

Forum Jump: