Beiträge von Parto

    public LoadFraks()
    {
    new field[7][40], buffer[512];
    mysql_query("SELECT id,leader,coleader,kasse,earn,lvlearn,coins FROM fraks");
    mysql_store_result();


    if(mysql_num_rows() > 0)
    {
    while(mysql_fetch_row(buffer, "|"))
    {
    split(buffer, field);
    new bid = strval(field[0]);
    format(FI[bid][leader], 33, "%s", field[1]);
    format(FI[bid][coleader], 33, "%s", field[2]);
    FI[bid][kasse] = strval(field[3]);
    FI[bid][earn] = strval(field[4]);
    FI[bid][lvlearn] = strval(field[5]);
    FI[bid][coins] = strval(field[6]);
    }
    }
    print("-> Fractions loaded.");
    mysql_free_result();
    return 1;
    }

    MySQL Error (0): Could not execute query. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM fraks' at line 1.
    [21:02:42] MySQL Error (0): Function: 'mysql_store_result' called when no prior query executed.. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM fraks' at line 1.


    was bedeuten diese fehler ? -.-

    Moinn ich hab ein fehler gemacht undzwar.


    /verweigerung


    aber funkt net hab das so gemacht ;)


    dcmd_verweigerung(playerid, params[])
    {
    new pID;
    if(PI[playerid][fraktion] !=4)
    {
    emsg(playerid, "> Du bist nicht autorisiert. (Nur Ordnungsamt)");
    } else if(sscanf( params, " %s ", pID))
    {
    imsg(playerid,"Benutze: /verweigerung [Name/SpielerID]");
    } else if(!IsPlayerConnected(pID))
    {
    emsg(playerid,"> Der Spieler ist nicht online.");
    return 1;
    } else {
    new msg[256];
    format(msg, 256,"<< BOS, (Ordnungsamt): %s hat %s der Polizei gemeldet Grund; Verweigerung. >>",GetPname(playerid),GetPname(pID));
    SendBosMsg(msg);
    imsg(pID, "** Dir wurde ein Crime eingetragen von Ordnungsamt Grund: Verweigerung.");
    SetPlayerWantedLevel(pID, 1);
    format(PI[pID][crime], 64, "1 Verweigerung");
    }
    return 1;
    }

    hab ich gemacht jetzt kommt das hier.


    [22:46:48] MySQL Error (0): Could not execute query. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'name='Aero_Galzone'' at line 1.

    Hallo Breadfish.



    Ich hab ein Problem mit meiner datenbank.
    undzwar ich kann die sachen net speichern lassen.



    //UserSave.




    public SaveUser(id)
    {
    new q[1500], q1[850], mres[32];
    mysql_real_escape_string(GetPname(id), mres);


    new llogin = timestamp();

    //PART 1
    format(q1, 850, "UPDATE user SET banres='%s',skin=%d,banned=%d,konto=%d,perso=%d,carlic=%d,flens=%d,house=%d,lastlogin=%d,gunlic=%d,car1=%d,mlr=%d,[b][color=#990000]kmp=%d[/color][/b]",
    PI[id][banres],PI[id][skin],PI[id][banned],PI[id][konto],PI[id][perso],PI[id][carlic],PI[id][flens],PI[id][house],llogin,PI[id][gunlic],PI[id][car1],PI[id][muesli],[b][color=#990000]PI[id][kampf])[/color][/b];
    strcat(q, q1);

    //PART2
    format(q1, 850, "car2=%d,job=%d,car3=%d,clock=%d,frak=%d,playtime=%d,respect=%d,ox='%.2f',oy='%.2f',oz='%.2f',oldint=%d,oldvi=%d,spawn=%d,medi=%d",
    PI[id][car2],PI[id][job],PI[id][car3],PI[id][clock],PI[id][fraktion],PI[id][playtime],PI[id][respect],PI[id][oldx],PI[id][oldy],PI[id][oldz],PI[id][oldint],PI[id][oldvi],PI[id][spawn],PI[id][medi]);
    strcat(q, q1);

    //PART3
    format(q1, 850, ",level=%d,pass='%s',gender=%d,age=%d,money=%d,bank=%d,warnings=%d,kicks=%d,admin=%d,packs=%d,jobpoints=%d,joblvl=%d,drugs=%d,ak=%d,ad=%d",
    PI[id][level],PI[id][pass],PI[id][gender],PI[id][age],PI[id][money],PI[id][bank],PI[id][warnings],PI[id][kicks],PI[id][admin],PI[id][packs],PI[id][jobpoints],PI[id][joblvl],PI[id][drugs],PI[id][akills],PI[id][adeaths]);
    strcat(q, q1);

    //PART4
    format(q1, 850, ",bizz=%d,kanister=%d,dice=%d,rank=%d,jail=%d,armour='%f',banto=%d,crime='%s',prepaid=%d,car4=%d,pbk=%d,pbd=%d,jt=%d,don=%d,ajail=%d,weps=%d,WHERE name='%s'",
    PI[id][bizz],PI[id][kanister],PI[id][dice],PI[id][rank],PI[id][jail],PI[id][armour],PI[id][banto],PI[id][crime],PI[id][prepaid],PI[id][car4],PI[id][s_pb][0],PI[id][s_pb][1],PI[id][s_jail],PI[id][donator],PI[id][ajail],PI[id][weps],mres);
    strcat(q, q1);


    mysql_query(q); //SAVE
    return 1;
    }



    In der Datenbank


    64kmpint(10)NoNone




    aber lässt sich nicht speichern bitte um hilfe.



    console.
    [17:44:03] MySQL Error (0): Could not execute query. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE name='Aero_Galzone'' at line 1.