Beiträge von Bluewall

    Poste bitte den Code mit dem du den Spieler speicherst (UPDATE...).



    stock SavePlayer(playerid)
    {
    new Query[256];
    mysql_format(Handle, Query, sizeof(Query), "UPDATE `Spieler` SET `IP`='%s', `Admin`=%d, `VIP`=%d, `Kills`=%d, `Deaths`=%d, `Level`=%d, `Geld`=%d WHERE `ID`=%d",\
    IP[playerid], SpielerInfo[playerid][Admin], SpielerInfo[playerid][VIP], SpielerInfo[playerid][Kills], SpielerInfo[playerid][Deaths], GetPlayerScore(playerid), SpielerInfo[playerid][Geld], SpielerInfo[playerid][ID]);
    mysql_tquery(Handle, Query, "", "");
    }


    Bitte Schön Jeffry. 8)

    Laut Log passt alles. Funktioniert es nicht? Wenn nicht, was klappt nicht?


    Auf Standart hat er ja bei Geld und alles anderem in der Datenbank auf 0, aber wenn ich auf dem Server einen Stunt mache, dann +79 Verdiene.
    Wird das nicht in der Datenbank gespeichert.

    Versuche es so:
    mysql_format(Handle, Query, sizeof(Query), "INSERT INTO `Spieler` (`Spielername`, `Passwort`, `IP`, `Admin`, `VIP`,`Kills`,`Deaths`,`Level`, `Geld`) VALUES ('%e', '%e', '%e', 0, 0, 0, 0, 0, 0)", Name[playerid], SpielerInfo[playerid][Passwort], IP[playerid]);
    printf("Query: %s", Query);


    Wenn es nicht klappt, poste was im Server Log und im MySQL Log steht.


    Server Log & MySQL Log als neu Registrierter:


    MySQL-Log: http://pastebin.com/cid726r5


    Server-Log: http://pastebin.com/M2yV0zqq


    Du hast mehr (oder weniger) spalten im INSERT angegeben als du Werte bei VALUES angegeben hast. Zähle das mal nach, oder poste gegebenenfalls den Code dazu.


    Meinst du das hier ? :



    mysql_format(Handle, Query, sizeof(Query), "INSERT INTO `Spieler` (`Spielername`, `Passwort`, `IP`, `Admin`, `VIP`,`Kills`,`Deaths`,`Level`, `Geld`) VALUES ('%e', '%s', '%s', 0, 0, 0, 0, 0, 0)", Name[playerid], SpielerInfo[playerid][Passwort], IP[playerid], SpielerInfo[playerid][Admin], SpielerInfo[playerid][VIP], SpielerInfo[playerid][Kills], SpielerInfo[playerid][Deaths], SpielerInfo[playerid][Level], SpielerInfo[playerid][Geld]);


    oder das ? :



    public OnAccountRegister(playerid)
    {
    SpielerInfo[playerid][ID] = cache_insert_id();
    printf("Neuer Account Registriert. | Spieler-ID: %d", SpielerInfo[playerid][ID]);
    IstRegistriert[playerid] = 1;
    return 1;
    }

    Zitat

    Lösung hierfür:
    new query[128];
    Zu
    new query[256];


    Dann tretet dieses Problem auf:




    [20:11:43] [DEBUG] mysql_format - connection: 1, len: 256, format: "INSERT INTO `Spieler` (`Spielername`, `Passwort`, `IP`, `Admin`, `VIP`, `Geld`, `Level`, `PosX` ,`PosY`, `PosZ`) VALUES ('%e', '..."
    [20:11:43] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `Spieler` (`Spielername`, `Passwort`, `IP`, `Admin`,", callback: "OnAccountRegister", format: "i"
    [20:11:43] [DEBUG] CMySQLQuery::Execute[OnAccountRegister] - starting query execution
    [20:11:43] [ERROR] CMySQLQuery::Execute[OnAccountRegister] - (error #1136) Column count doesn't match value count at row 1
    [20:11:43] [DEBUG] CMySQLQuery::Execute[OnAccountRegister] - error will be triggered in OnQueryError


    Jeffry: | Jeffry


    MfG MiX(eP)

    MSVCR100 - Wird für das sscanf Plugin benötigt. Download: http://www.dllrepair.com/dll/d…msvcr100.dll/msvcr100.htm


    Danach müsste vielleicht (!) noch eine Fehlermeldung kommen, das MSVCR110 Fehlt. Download: http://www.opendll.com/index.p…soft%AE-C-Runtime-Library


    LIBMYSQL - Wird für das MySQL-Plugin benötigt, müsste eigentlich in der RAR-Datei vom Plugin dabei sein. Schau welches MySQL-Plugin du hast und füge alles in deinem Serverordner ein.


    @SunRiZez: | @SunRiZez

    Guten Abend meine Lieben Mitmenschen. Ich habe ein Problem mit meinem Server,
    Das Script sollte den Spieler korrekt abspeichern, was das Script aber nicht tut. Bei OnPlayerDisconnect habe ich Folgenden Query erstellt:



    new Query[128], Float:Pos[3];
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    mysql_format(M_Handle, Query, sizeof(Query), "UPDATE `Spieler` SET `Admin`=%d, `VIP`=%d, `Geld`=%d, `Level`=%d, `PosX`=%f, `PosY`=%f, `PosZ`=%f WHERE `ID`=%d",\
    SpielerInfo[playerid][Admin], SpielerInfo[playerid][VIP], SpielerInfo[playerid][Geld], SpielerInfo[playerid][Level], Pos[0], Pos[1], Pos[2], SpielerInfo[playerid][ID]);
    mysql_tquery(M_Handle, Query, "", "");


    Folgendes wird dann im mysql_log abgeschickt.


    Das kommt wenn ich den Server starte. :



    [22:25:03] [DEBUG] mysql_connect - host: "Zensiert", user: "Zensiert", database: "Zensiert", password: "Zensiert", port: 3306, autoreconnect: true, pool_size: 2
    [22:25:03] [DEBUG] CMySQLHandle::Create - creating new connection..
    [22:25:03] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
    [22:25:03] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
    [22:25:03] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    [22:25:03] [DEBUG] CMySQLConnection::Connect - connection was successful
    [22:25:03] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [22:25:03] [DEBUG] mysql_errno - connection: 1
    [22:25:03] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    [22:25:03] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    [22:25:03] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
    [22:25:03] [DEBUG] CMySQLConnection::Connect - connection was successful
    [22:25:03] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [22:25:03] [DEBUG] CMySQLConnection::Connect - connection was successful
    [22:25:03] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
    [22:25:03] [DEBUG] CMySQLConnection::Connect - connection was successful
    [22:25:03] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled


    Und das dann wenn ich als Spieler auf dem Server Connecte. :



    [22:27:43] [DEBUG] mysql_format - connection: 1, len: 128, format: "SELECT `Passwort`, `ID` FROM `Spieler` WHERE `Spielername` = '%e' LIMIT 1"
    [22:27:44] [DEBUG] mysql_tquery - connection: 1, query: "SELECT `Passwort`, `ID` FROM `Spieler` WHERE `Spielername` = 'Ra", callback: "OnAccountCheck", format: "i"
    [22:27:44] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Admin", connection: 1
    [22:27:44] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - starting query execution
    [22:27:44] [WARNING] cache_get_field_content_int - no active cache
    [22:27:44] [DEBUG] cache_get_field_content_int - row: 0, field_name: "VIP", connection: 1
    [22:27:44] [WARNING] cache_get_field_content_int - no active cache
    [22:27:44] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Geld", connection: 1
    [22:27:44] [WARNING] cache_get_field_content_int - no active cache
    [22:27:44] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Level", connection: 1
    [22:27:44] [WARNING] cache_get_field_content_int - no active cache
    [22:27:44] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosX", connection: 1
    [22:27:44] [WARNING] cache_get_field_content_float - no active cache
    [22:27:44] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosY", connection: 1
    [22:27:44] [WARNING] cache_get_field_content_float - no active cache
    [22:27:44] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosZ", connection: 1
    [22:27:44] [WARNING] cache_get_field_content_float - no active cache
    [22:27:45] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 744.384 milliseconds
    [22:27:45] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [22:27:45] [DEBUG] Calling callback "OnAccountCheck"..
    [22:27:45] [DEBUG] cache_get_data - connection: 1
    [22:27:45] [DEBUG] cache_get_field_content - row: 0, field_name: "Passwort", connection: 1, max_len: 129
    [22:27:45] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Passwort", data: "2E80825A14953AB03208B02509B69B1CA126439882DA1112E24FD98870288F2B7C4E33CBA7F5E62428CF0E109DD905326486078964E1BC00F64EFD7CC210EC10"
    [22:27:45] [DEBUG] cache_get_field_content_int - row: 0, field_name: "ID", connection: 1
    [22:27:45] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "ID", data: "1"
    [22:27:45] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [22:28:05] [DEBUG] mysql_format - connection: 1, len: 100, format: "SELECT * FROM `Spieler` WHERE `Spielername` = '%e' LIMIT 1"
    [22:28:05] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `Spieler` WHERE `Spielername` = 'Rammbock' LIMIT 1", callback: "OnAccountLoad", format: "i"
    [22:28:05] [DEBUG] CMySQLQuery::Execute[OnAccountLoad] - starting query execution
    [22:28:05] [DEBUG] CMySQLQuery::Execute[OnAccountLoad] - query was successfully executed within 10.663 milliseconds
    [22:28:05] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
    [22:28:05] [DEBUG] Calling callback "OnAccountLoad"..
    [22:28:05] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Admin", connection: 1
    [22:28:05] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Admin", data: "5"
    [22:28:05] [DEBUG] cache_get_field_content_int - row: 0, field_name: "VIP", connection: 1
    [22:28:05] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "VIP", data: "0"
    [22:28:05] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Geld", connection: 1
    [22:28:05] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Geld", data: "0"
    [22:28:05] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Level", connection: 1
    [22:28:05] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Level", data: "5"
    [22:28:05] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosX", connection: 1
    [22:28:05] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosX", data: "1213.06"
    [22:28:05] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosY", connection: 1
    [22:28:05] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosY", data: "1055.97"
    [22:28:05] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosZ", connection: 1
    [22:28:05] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosZ", data: "6.798"
    [22:28:05] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
    [22:28:50] [DEBUG] mysql_format - connection: 1, len: 128, format: "UPDATE `Spieler` SET `Admin`=%d, `VIP`=%d, `Geld`=%d, `Level`=%d, `PosX`=%f, `PosY`=%f, `PosZ`=%f WHERE `ID`=%d"
    [22:28:50] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `Spieler` SET `Admin`=5, `VIP`=0, `Geld`=0, `Level`=5, `P", callback: "(null)", format: "(null)"
    [22:28:50] [DEBUG] CMySQLQuery::Execute[] - starting query execution
    [22:28:50] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 784.988 milliseconds
    [22:28:50] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
    [22:29:00] [DEBUG] mysql_close - connection: 1


    Oder könnte es woanders dran Liegen? Lösungen wären Erforderlich!
    MfG MiX(eP) :thumbup:

    Run time error 19: "File or function is not found"


    Zeig uns deine ganze Server.cfg.


    Denn:


    Run time error 19: "File or function is not found"


    bedeutet:


    Laufzeit Fehler 19: "Datei oder Funktion nicht gefunden"


    Dir fehlt ein Plugin.

    Lösung gefunden!


    Man benutzt einfach vom MySQL R39-2 Plugin: mysql-r39-2-linux.tar.gz


    Das mysql_static.so Plugin dann geht es! Bei mir hat es Funktioniert.

    Das Thema wurde bereits etliche Male hier im Forum besprochen. Oftmals sogar mit Lösung des Problems.
    Also befragt doch einfach mal die Suchfunktion unseres Forums.


    Da finde ich immer nur sowas als Lösung:


    apt-get install mysql-client



    apt-get dist-update
    apt-get upgrade


    apt-get install ia32-libs


    Wo soll man sowas bei Nitrado eingeben?

    Benutzt du die R39-3?


    Wenn ja, ich hab genau das gleiche Problem. es kommt der Fehler oder? :



    Loading plugin: mysql.so
    Failed (libmysqlclient.so.18: cannot open shared object file: No such file or directory)