Trying to load clubs crashes samp-server.exe
#1

Okay so im trying to load my clubs with this code:
pawn Код:
forward LoadClubs();
public LoadClubs()
{
    new rows, fields;
    cache_get_data( rows, fields, Handle);
    if(!rows)
    {
        print("Clubs table is empty, no results found.");
        return 1;
    }
    for(new i = 0; i < MAX_CLUBS; i++)
    {
        AClubData[i][ID] = cache_get_row_int(i, 0, Handle);
        cache_get_row(i, 2, AClubData[i][Owner], Handle, 1);
        AClubData[i][ClubX] = cache_get_row_float(i, 2, Handle);
        AClubData[i][ClubY] = cache_get_row_float(i, 3, Handle);
        AClubData[i][ClubZ] = cache_get_row_float(i, 4, Handle);
        AClubData[i][PickUpID] = CreateDynamicPickup(1273, 1, AClubData[i][ClubX], AClubData[i][ClubY], AClubData[i][ClubZ], -1);
    }
    return 1;
}
It crashes on the lines with cache_get_row_float and the cache_get_row_int part.

Crashdetect:
[18:20:21] [debug] Server crashed while executing ET.amx
[18:20:21] [debug] AMX backtrace:
[18:20:21] [debug] #0 native cache_get_row_float () [6e9d4cf0] from mysql.DLL
[18:20:21] [debug] #1 0001f7dc in public LoadClubs () at C:\Humptydump\Sa-mp 0.3z\gamemodes\ET.pwn:3000
[18:20:21] [debug] Native backtrace:
[18:20:21] [debug] #0 6e9d4d72 in ?? () from plugins\mysql.DLL
[18:20:21] [debug] #1 004010b6 in ?? () from samp-server.exe
[18:20:21] [debug] #2 6e5d58ca in ?? () from plugins\crashdetect.DLL
[18:20:21] [debug] #3 6e5d774f in ?? () from plugins\crashdetect.DLL
[18:20:21] [debug] #4 6e5d0834 in ?? () from plugins\crashdetect.DLL
[18:20:21] [debug] #5 6e5d591a in ?? () from plugins\crashdetect.DLL
[18:20:21] [debug] #6 6e9d8b59 in ?? () from plugins\mysql.DLL
[18:20:21] [debug] #7 00469166 in ?? () from samp-server.exe
[18:20:21] [debug] #8 00486fe0 in ?? () from samp-server.exe
[18:20:21] [debug] #9 00495911 in ?? () from samp-server.exe
[18:20:21] [debug] #10 00495921 in ?? () from samp-server.exe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)