MySQL R7 Crash
#1

pawn Код:
LoadVehicles()
{
    mysql_function_query(ConexiuneMySQL, "SELECT * FROM `masini`", true, "LoadVehicless", "");
    return 1;
}
Functie LoadVehicless()
{
    new Index;
    new string[255];
    new rows, fields;
    cache_get_data(rows, fields,ConexiuneMySQL);
    if(rows)
    {
        for(new i = 0; i < rows; i++)
        {
            Index = i + 1;
            cache_get_row(i, 0, string,ConexiuneMySQL); VehicleCarID[Index] = strval(string);
            VehicleCountMySQL = VehicleCarID[Index];
            cache_get_row(i, 1, string,ConexiuneMySQL); VehicleCreated[Index] = strval(string);
            cache_get_row(i, 2, string,ConexiuneMySQL); VehicleModel[Index] = strval(string);
            cache_get_row(i, 3, string,ConexiuneMySQL); VehiclePos[Index][0] = floatstr(string);
            cache_get_row(i, 4, string,ConexiuneMySQL); VehiclePos[Index][1] = floatstr(string);
            cache_get_row(i, 5, string,ConexiuneMySQL); VehiclePos[Index][2] = floatstr(string);
            cache_get_row(i, 6, string,ConexiuneMySQL); VehiclePos[Index][3] = floatstr(string);
            cache_get_row(i, 7, string,ConexiuneMySQL); VehicleColor[Index][0] = strval(string);
            cache_get_row(i, 8, string,ConexiuneMySQL); VehicleColor[Index][1] = strval(string);
            cache_get_row(i, 9, string,ConexiuneMySQL); VehicleInterior[Index] = strval(string);
            cache_get_row(i, 10, string,ConexiuneMySQL); VehicleWorld[Index] = strval(string);
            cache_get_row(i, 11, string,ConexiuneMySQL); strmid(VehicleOwner[Index], string, 0, strlen(string), MAX_PLAYER_NAME);
            cache_get_row(i, 12, string,ConexiuneMySQL); strmid(VehicleNumberPlate[Index], string, 0, strlen(string), 16);
            cache_get_row(i, 13, string,ConexiuneMySQL); VehicleValue[Index] = strval(string);
            cache_get_row(i, 14, string,ConexiuneMySQL); VehicleLock[Index] = strval(string);
            cache_get_row(i, 15, string,ConexiuneMySQL); VehicleAlarm[Index] = strval(string);
            cache_get_row(i, 16, string,ConexiuneMySQL); VehiclePaintjob[Index] = strval(string);
            cache_get_row(i, 17, string,ConexiuneMySQL); VehicleTrunk[Index][0][0] = strval(string);
            cache_get_row(i, 18, string,ConexiuneMySQL); VehicleTrunk[Index][0][1] = strval(string);
            cache_get_row(i, 19, string,ConexiuneMySQL); VehicleTrunk[Index][1][0] = strval(string);
            cache_get_row(i, 20, string,ConexiuneMySQL); VehicleTrunk[Index][1][1] = strval(string);
            cache_get_row(i, 21, string,ConexiuneMySQL); VehicleTrunk[Index][2][0] = strval(string);
            cache_get_row(i, 22, string,ConexiuneMySQL); VehicleTrunk[Index][2][1] = strval(string);
            cache_get_row(i, 23, string,ConexiuneMySQL); VehicleTrunk[Index][3][0] = strval(string);
            cache_get_row(i, 24, string,ConexiuneMySQL); VehicleTrunk[Index][3][1] = strval(string);
            cache_get_row(i, 25, string,ConexiuneMySQL); VehicleTrunk[Index][4][0] = strval(string);
            cache_get_row(i, 26, string,ConexiuneMySQL); VehicleTrunk[Index][4][1] = strval(string);
            cache_get_row(i, 27, string,ConexiuneMySQL); VehicleMods[Index][0] = strval(string);
            cache_get_row(i, 28, string,ConexiuneMySQL); VehicleMods[Index][1] = strval(string);
            cache_get_row(i, 29, string,ConexiuneMySQL); VehicleMods[Index][2] = strval(string);
            cache_get_row(i, 30, string,ConexiuneMySQL); VehicleMods[Index][3] = strval(string);
            cache_get_row(i, 31, string,ConexiuneMySQL); VehicleMods[Index][4] = strval(string);
            cache_get_row(i, 32, string,ConexiuneMySQL); VehicleMods[Index][5] = strval(string);
            cache_get_row(i, 33, string,ConexiuneMySQL); VehicleMods[Index][6] = strval(string);
            cache_get_row(i, 34, string,ConexiuneMySQL); VehicleMods[Index][7] = strval(string);
            cache_get_row(i, 35, string,ConexiuneMySQL); VehicleMods[Index][8] = strval(string);
            cache_get_row(i, 36, string,ConexiuneMySQL); VehicleMods[Index][9] = strval(string);
            cache_get_row(i, 37, string,ConexiuneMySQL); VehicleMods[Index][10] = strval(string);
            cache_get_row(i, 38, string,ConexiuneMySQL); VehicleMods[Index][11] = strval(string);
            cache_get_row(i, 39, string,ConexiuneMySQL); VehicleMods[Index][12] = strval(string);
            cache_get_row(i, 40, string,ConexiuneMySQL); VehicleMods[Index][13] = strval(string);
            cache_get_row(i, 41, string,ConexiuneMySQL); strmid(MotivRemorcare[Index], string, 0, strlen(string), 128);
            cache_get_row(i, 42, string,ConexiuneMySQL); strmid(AutorRemorcare[Index], string, 0, strlen(string), 128);
            cache_get_row(i, 43, string,ConexiuneMySQL); AmendaRemorcare[Index] = strval(string);
            cache_get_row(i, 44, string,ConexiuneMySQL); MasinaRemorcare[Index] = strval(string);
        }
        printf("  Loaded %d vehicles", Index);
        for(new i=1; i < MAX_DVEHICLES; i++)
        {
            UpdateVehicle(i, 0);
        }
    }
    else printf(" No vehicle loeaded");
    return 1;
}
After execution , the server get a big crash , what is wrong?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)