MYSQL R7 Fraktions Fahrzeuge laden nicht

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Guten Tag,


    In der Datenbank sind Fahrzeuge eingetragen abersie werden nicht geladen/erstellt...


    Hier mein code:


    Spoiler anzeigen

    stock OnCheckFraktionCars()
    {
    //new query[128];
    //format(query,sizeof(query),"SELECT * FROM `fraktioncars`");
    mysql_function_query(sqlcon,"SELECT * FROM `fraktioncars`",true,"OnLoadFraktionCars","");
    }

    Spoiler anzeigen
    public OnLoadFraktionCars()
    {
    new num_rows, num_fields;
    cache_get_data(num_rows, num_fields);
    if(!num_rows)return 1;
    for(new idx =0; idx < MAX_FRAKCARS; idx ++)
    {
    new output[32];
    cache_get_field_content(0,"SQLid",output);
    fInfo[idx][fSQLid] = strval(output);

    Spoiler anzeigen
    cache_get_field_content(0,"Model",output);
    fInfo[idx][fModelID] = strval(output);

    Spoiler anzeigen
    cache_get_field_content(0,"FraktionsID",output);
    fInfo[idx][fFrakID] = strval(output);

    Spoiler anzeigen
    cache_get_field_content(0,"PosX",output);
    fInfo[idx][f_X] = floatstr(output);

    Spoiler anzeigen
    cache_get_field_content(0,"PosY",output);
    fInfo[idx][f_Y] = floatstr(output);

    Spoiler anzeigen
    cache_get_field_content(0,"PosZ",output);
    fInfo[idx][f_Z] = floatstr(output);

    Spoiler anzeigen
    cache_get_field_content(0,"PosR",output);
    fInfo[idx][f_R] = floatstr(output);

    Spoiler anzeigen
    cache_get_field_content(0,"Color",output);
    fInfo[idx][fColor][0] = strval(output);

    Spoiler anzeigen
    cache_get_field_content(0,"Color2",output);
    fInfo[idx][fColor][1] = strval(output);

    Spoiler anzeigen
    cache_get_field_content(0,"Tank",output);
    fInfo[idx][Tank] = strval(output);

    Spoiler anzeigen
    cache_get_field_content(0,"UmParken",output);
    fInfo[idx][UmParken] = strval(output);
    if(fInfo[idx][fModelID] >= 400 && fInfo[idx][fModelID] <= 611)
    {
    fInfo[idx][fCarid] = CreateVehicle(fInfo[idx][fModelID],fInfo[idx][f_X],fInfo[idx][f_Y],fInfo[idx][f_Z],fInfo[idx][f_R],fInfo[idx][fColor][0],fInfo[idx][fColor][1], -1);
    Benzin[fInfo[idx][fCarid]] = fInfo[idx][Tank];
    printf("Fahrzeug %d geladen!",idx);
    }
    }
    return 1;
    }