SA-MP Forums Archive
crashdetect problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: crashdetect problem (/showthread.php?tid=369821)



crashdetect problem - Luis- - 18.08.2012

Hello, I recently made a timer for my script which is basically used for checking the time and setting the world time to the new hour and setting the time textdraw to the current time.

The Timer
pawn Code:
SetTimer("WorldTime", 1000, true);
The Timer Code
pawn Code:
forward WorldTime();
public WorldTime() {
    new hour, mins, secs, string[12], timeformat[3];
    gettime(hour, mins, secs);
    hour += ServerTimeZone;
    SetWorldTime(hour);
    switch(hour) {
        case 0..11: {
            timeformat = "AM";
        }
        case 12..23: {
            timeformat = "PM";
        }
    }
    format(string, sizeof string, "%02d:%02d:%02d %s", hour, mins, secs, timeformat);
    TextDrawSetString(TimeTextDraw, string);
    return 1;
}
Here's the error in my log;
Code:
[09:31:15] [debug] Bad heap release detected:
[09:31:15] [debug]  mysql.DLL [10001842] is releasing memory at 004ac21c which is out of heap
[09:31:15] [debug] System backtrace:
[09:31:17] [debug] #0 6ed3fe3c in ?? () from C:\Users\Aaron\SAMP Scripts\City Life RP\plugins\crashdetect.DLL
[09:31:18] [debug] #1 6ed40720 in ?? () from C:\Users\Aaron\SAMP Scripts\City Life RP\plugins\crashdetect.DLL
[09:31:18] [debug] #2 6ed43c97 in ?? () from C:\Users\Aaron\SAMP Scripts\City Life RP\plugins\crashdetect.DLL
[09:31:18] [debug] #3 10001842 in ProcessTick () from C:\Users\Aaron\SAMP Scripts\City Life RP\plugins\mysql.DLL
[09:31:18] [debug] #4 004849ea in ?? () from C:\Users\Aaron\SAMP Scripts\City Life RP\samp-server.exe
It's starting to get on my nerves. Can anyone see a problem?


Re: crashdetect problem - Michael@Belgium - 18.08.2012

Quote:

checking the time and setting the world time to the new hour and setting the time textdraw to the current time.

I think that is used in the filterscript gl_realtime.