18.08.2012, 08:14
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
The Timer Code
Here's the error in my log;
It's starting to get on my nerves. Can anyone see a problem?
The Timer
pawn Code:
SetTimer("WorldTime", 1000, true);
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;
}
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