Beiträge von Catybubu

    Das Problem lag darin das ich 2 Verschiedende Querys losgeschickt habe



    new query[256],query2[256];
    format(query,sizeofstring(query),"UPDATE BLABLA",pInfo);
    format(query,sizeofstring(query2),"UPDATE BLABLA2",pInfo);
    mysql_tquery(dbhandle,query,"","");
    mysql_tquery(dbhandle,query2"","");


    Nun schick ich die Query nur mit einer Query los undzwar hintereinander:



    new query[256];
    format(query,sizeofstring(query),"UPDATE BLABLA",pInfo);
    mysql_tquery(dbhandle,query,"","");
    format(query,sizeofstring(query),"UPDATE BLABLA2",pInfo);
    mysql_tquery(dbhandle,query,"","");


    @seegras: und nun bitte closen danke :)

    [20:19:44] [ERROR] CMySQLQuery::Execute[()] - (error #1064) 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 ''0' WHERE id='1'' at line 1[20:28:45] [ERROR] CMySQLQuery::Execute[()] - (error #1064) 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 ''-1' WHERE id='1'' at line 1[20:28:45] [ERROR] CMySQLQuery::Execute[()] - (error #1064) 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 ''851806624' WHERE id='3'' at line 1[20:29:28] [ERROR] CMySQLQuery::Execute[()] - (error #1064) 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 ''0' WHERE id='1'' at line 1[20:41:24] [ERROR] CMySQLQuery::Execute[()] - (error #1064) 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 ''-10001' WHERE id='1'' at line 1[20:46:35] [ERROR] CMySQLQuery::Execute[()] - (error #1064) 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 ''1110991111' WHERE id='3'' at line 1[16:13:09] [ERROR] CMySQLQuery::Execute[()] - (error #1064) 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 ''0' WHERE id='1'' at line 1[20:33:04] [ERROR]


    @Nils24hero

    Guten Tag,


    ich habe ein problem bezüglich meines Abspeicherungs System was sich auf das Plugin von GStylez:R34 bezieht.
    Es wird entweder unvollständig oder garnicht gespeichert:
    Hier die Codes:


    savePlayer(playerid)
    {
    //Speichern level,tode,kills,money
    if(pInfo[playerid][peingeloggt]== 0)return 1;
    new query[256];
    new query2[512];
    format(query,sizeof(query),"UPDATE user SET level='%i',money='%i',kills='%i',tode='%i',alevel='%i',fmember='%i',fleader='%i',frang='%i',bank='%i',warns='%i' WHERE id='%i'",pInfo[playerid][plevel],GetPlayerMoney(playerid),pInfo[playerid][pkills],pInfo[playerid][ptode],pInfo[playerid][padmin],pInfo[playerid][pfmember],pInfo[playerid][pfleader],pInfo[playerid][pfrang],pInfo[playerid][pbank],pInfo[playerid][pwarns],pInfo[playerid][db_id]);
    format(query2,sizeof(query2),"UPDATE user SET driverlicense='%i',driverpoints='%i',bikelicense='%i',bikepoints='%i',trucklicense='%i',boatlicense='%i',flylicense='%i',gunlicense='%i',fishinglicense='%i' WHERE id='%i'",pInfo[playerid][pcarlic],pInfo[playerid][pcarpoints],pInfo[playerid][pbikelic],pInfo[playerid][pbikepoints],pInfo[playerid][ptrucklic],pInfo[playerid][pflylic],pInfo[playerid][pgunlic],pInfo[playerid][pfishlic],pInfo[playerid][db_id]);
    mysql_tquery(dbhandle,query,"","");
    mysql_tquery(dbhandle,query2,"","");


    return 1;
    }


    enum playerInfo{
    plevel,
    pname,
    pmoney,
    padmin,
    paduty,
    peingeloggt,
    pkills,
    ptode,
    pspawn,
    pskin,
    pcarlic,
    pcarpoints,
    pbikelic,
    pbikepoints,
    ptrucklic,
    pboatlic,
    pflylic,
    pgunlic,
    pfishlic,
    pfmember,
    pfleader,
    pfrang,
    pbanned,
    pwarns,
    pbank,
    db_id,
    pJob
    }


    ocmd:lic(playerid,params[])
    {
    new string[128],pID,licname[128],sendername[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME];
    GetPlayerName(pID,name,sizeof(name));
    GetPlayerName(playerid,sendername,sizeof(sendername));
    if(!isAdmin(playerid,2))
    {
    return SendClientMessage(playerid,COLOR_LIGHTRED,"Du bist nicht berechtigt!");
    }
    if(sscanf(params,"us",pID,licname))
    {
    SendClientMessage(playerid,COLOR_GREY,"Benutze: /lic [playerid] [licname]");
    SendClientMessage(playerid,COLOR_GREY,"Auto, Flugzeug, Bike, Segeln, Waffe, Angeln, LKW, Alle");
    return 1;
    }
    if(strcmp(licname,"Auto",true) == 0)
    {
    pInfo[pID][pcarlic] = 1;
    format(string,sizeof(string),"Admin Info: %s %s hat %s den Schein: %s gegeben!",AdminRang(playerid),sendername,name,licname);
    SendClientMessage(pID,COLOR_LIGHTBLUE,"Du erhälst den Führerschein.");
    ABroadCast(COLOR_LILA,string,1);
    return 1;
    }
    else if(strcmp(licname,"Flugzeug",true) == 0)
    {
    pInfo[pID][pflylic] = 1;
    format(string,sizeof(string),"Admin Info: %s %s hat %s den Schein: %s gegeben!",AdminRang(playerid),sendername,name,licname);
    SendClientMessage(pID,COLOR_LIGHTBLUE,"Du erhälst den Flugschein.");
    ABroadCast(COLOR_LILA,string,1);
    return 1;
    }
    else if(strcmp(licname,"Bike",true) == 0)
    {
    pInfo[pID][pbikelic] = 1;
    format(string,sizeof(string),"Admin Info: %s %s hat %s den Schein: %s gegeben!",AdminRang(playerid),sendername,name,licname);
    SendClientMessage(pID,COLOR_LIGHTBLUE,"Du erhälst den Motorradschein.");
    ABroadCast(COLOR_LILA,string,1);
    return 1;
    }
    else if(strcmp(licname,"Segeln",true) == 0)
    {
    pInfo[pID][pboatlic] = 1;
    format(string,sizeof(string),"Admin Info: %s %s hat %s den Schein: %s gegeben!",AdminRang(playerid),sendername,name,licname);
    SendClientMessage(pID,COLOR_LIGHTBLUE,"Du erhälst den Segelschein.");
    ABroadCast(COLOR_LILA,string,1);
    return 1;
    }
    else if(strcmp(licname,"Waffe",true) == 0)
    {
    pInfo[pID][pgunlic] = 1;
    format(string,sizeof(string),"Admin Info: %s %s hat %s den Schein: %s gegeben!",AdminRang(playerid),sendername,name,licname);
    SendClientMessage(pID,COLOR_LIGHTBLUE,"Du erhälst den Waffenschein.");
    ABroadCast(COLOR_LILA,string,1);
    return 1;
    }
    else if(strcmp(licname,"Angeln",true) == 0)
    {
    pInfo[pID][pfishlic] = 1;
    format(string,sizeof(string),"Admin Info: %s %s hat %s den Schein: %s gegeben!",AdminRang(playerid),sendername,name,licname);
    SendClientMessage(pID,COLOR_LIGHTBLUE,"Du erhälst den Angelschein.");
    ABroadCast(COLOR_LILA,string,1);
    return 1;
    }
    else if(strcmp(licname,"LKW",true) == 0)
    {
    pInfo[pID][ptrucklic] = 1;
    format(string,sizeof(string),"Admin Info: %s %s hat %s den Schein: %s gegeben!",AdminRang(playerid),sendername,name,licname);
    SendClientMessage(pID,COLOR_LIGHTBLUE,"Du erhälst den LKWSchein.");
    ABroadCast(COLOR_LILA,string,1);
    return 1;
    }
    else if(strcmp(licname,"Alle",true) == 0)
    {
    pInfo[pID][pcarlic] = 1;
    pInfo[pID][pflylic] = 1;
    pInfo[pID][pbikelic] = 1;
    pInfo[pID][pboatlic] = 1;
    pInfo[pID][pgunlic] = 1;
    pInfo[pID][pfishlic] = 1;
    pInfo[pID][ptrucklic] = 1;
    format(string,sizeof(string),"Admin Info: %s %s hat %s alle Scheine gegeben!",AdminRang(playerid),sendername,name);
    SendClientMessage(pID,COLOR_LIGHTBLUE,"Du erhälst alle Scheine.");
    ABroadCast(COLOR_LILA,string,1);
    return 1;
    }
    savePlayer(pID);
    return 1;
    }



    public OnPlayerDisconnect(playerid, reason)
    {
    savePlayer(playerid);
    SetTimerEx("resetplayerdata", 1000,false,"i",playerid);
    for(new i=0; i<sizeof(cInfo); i++)
    {
    if(cInfo[i][id_x]==0)continue;
    if(cInfo[i][besitzer]!=pInfo[playerid][db_id])continue;
    new query[128];
    format(query,sizeof(query),"UPDATE autos SET locked='%i' WHERE id='%i'",cInfo[i][c_locked],cInfo[i][db_id]);
    mysql_tquery(dbhandle,query,"","");
    DestroyVehicle(cInfo[i][id_x]);
    cInfo[i][id_x]=0;
    }
    savePlayer(playerid);
    SetTimerEx("resetplayerdata", 1000,false,"i",playerid);
    return 1;
    }


    Vielen dank im voraus :)