Spieler Speichern

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 Abend,


    Die Spieler werden nicht gespeichert und ich weiss nicht woran es liegen könnte.
    Ich hoffe jemand kann mir helfen.


    Hier der Code:


    Spoiler anzeigen
    stock UpdatePlayer(i)
    {
    new query[500];
    format(query, sizeof query, "UPDATE `accounts` SET `Admin`='%d',`Geld`='%d',`Skin`='%d',`Level`='%d',`Fraktion`='%d',`Rank`='%d',`HouseID`='%d' WHERE `ID`='%d'",
    pInfo[i][pAdmin],pInfo[i][pMoney],pInfo[i][pSkin],pInfo[i][pLevel],pInfo[i][pFraktion],pInfo[i][pRank],pInfo[i][pHouseID],pInfo[i][SQLID]);
    mysql_function_query(sqlcon,query,false,"","");
    return 1;
    }

  • Code
    00:25:33] >> mysql_query_callback( Connection handle: 1 )
    [00:25:33] Passing query UPDATE `Accounts` SET `Admin`='10',`Geld`='4800',`Skin`='101',`Level`='0',`Fraktion`='0',`Rank`='0',`HouseID`='1' WHERE `ID`='1' | 
    [00:25:33] CMySQLHandler::ProcessQueryThread() - Error will be triggered to OnQueryError()
    [00:25:33] Passing query UPDATE `House` SET `MieterActive`='0', `BuyScore`='1', `BuyPrice`='200', `Besetzt`='1', `Interior`='0', `Besitzer`='', `Beschreibung`='LS-Strand' WHERE `HouseID`='1' | 
    [00:25:33] CMySQLHandler::ProcessQueryThread() - Error will be triggered to OnQueryError()
  • Code
    [00:30:25]  ** MySQL Debugging enabled (03/27/14)[00:30:25]  [00:30:25] >> mysql_query_callback( Connection handle: 1 )[00:30:25] >> mysql_query_callback( Connection handle: 1 )[00:30:25] Passing query SELECT * FROM House | [00:30:25] ProcessQueryThread(OnLoadHouse) - Query was successful. (SELECT * FROM House)[00:30:25] ProcessQueryThread(OnLoadHouse) - Data caching enabled.[00:30:25] CMySQLHandler::StoreResult() - Result was stored.[00:30:25] CMySQLHandler::FreeResult() - Result was successfully free'd.[00:30:25] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()[00:30:25] OnLoadHouse() - Threaded function called.[00:30:25] >> cache_get_data( Connection handle: 1 )[00:30:25] ProcessTick() - The cache has been cleared.[00:30:25] Passing query SELECT * FROM `Accounts` WHERE `Name`='YoSohai' | i[00:30:25] ProcessQueryThread(OnCheckPlayer) - Query was successful. (SELECT * FROM `Accounts` WHERE `Name`='YoSohai')[00:30:25] ProcessQueryThread(OnCheckPlayer) - Data caching enabled.[00:30:25] CMySQLHandler::StoreResult() - Result was stored.[00:30:25] CMySQLHandler::FreeResult() - Result was successfully free'd.[00:30:25] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()[00:30:25] OnCheckPlayer(i) - Threaded function called.[00:30:25] >> cache_get_data( Connection handle: 1 )[00:30:25] ProcessTick() - The cache has been cleared.[00:30:28] >> mysql_query_callback( Connection handle: 1 )[00:30:28] Passing query SELECT * FROM `Accounts` WHERE `Name` = 'YoSohai' AND `Passwort` = md5('********') | i[00:30:28] ProcessQueryThread(OnLoadPlayer) - Query was successful. (SELECT * FROM `Accounts` WHERE `Name` = 'YoSohai' AND `Passwort` = md5('********'))[00:30:28] ProcessQueryThread(OnLoadPlayer) - Data caching enabled.[00:30:28] CMySQLHandler::StoreResult() - Result was stored.[00:30:28] CMySQLHandler::FreeResult() - Result was successfully free'd.[00:30:28] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()[00:30:28] OnLoadPlayer(i) - Threaded function called.[00:30:28] >> cache_get_data( Connection handle: 1 )[00:30:28] ProcessTick() - The cache has been cleared.[00:30:46] >> mysql_query_callback( Connection handle: 1 )[00:30:46] >> mysql_query_callback( Connection handle: 1 )[00:30:46] Passing query UPDATE `Accounts` SET `Admin`='10',`Geld`='4800',`Skin`='101',`Level`='0',`Fraktion`='0',`Rank`='0',`HouseID`='1' WHERE `ID`='1' | [00:30:46] CMySQLHandler::ProcessQueryThread() - Error will be triggered to OnQueryError()[00:30:46] OnQueryError() - Called.[00:30:46] Passing query UPDATE `House` SET `MieterActive`='0', `BuyScore`='1', `BuyPrice`='200', `Besetzt`='1', `Interior`='0', `Besitzer`='', `Beschreibung`='LS-Strand' WHERE `HouseID`='1' | [00:30:46] CMySQLHandler::ProcessQueryThread() - Error will be triggered to OnQueryError()[00:30:46] OnQueryError() - Called.


  • Schonmal was von printf gehört?
    public OnQueryError(errorid,error[],callback[],query[],connectionHandle)
    {
    return printf("SQLError %i: %s -- query=%s",errorid,error,query);
    }



    @TE Sind alle Felder genau so wie sie in der Tabelle stehen?
    Denn der Query ist richtig.


    Mach mal UPDATE IGNORE und schau ob er ein Teil speichert

    All in all it's just another brick in the wall