MySQL speichert SpawnLoc nicht ab, alles andere aber schon

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
  • Hey,


    wie die Überschrift schon sagt ..


    stock SavePlayer(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    if(GetPVarInt(playerid,"Eingeloggt") == 1)
    {
    GetPlayerName(playerid, PlayerInfo[playerid][pName], MAX_PLAYER_NAME);
    mysql_SetInt("accountsdm", "Geld", GetPlayerMoney(playerid), "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accountsdm", "Level", GetPlayerScore(playerid), "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accountsdm", "Morde", PlayerInfo[playerid][pKills], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accountsdm", "Tode", PlayerInfo[playerid][pDeaths], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accountsdm", "AdminLevel", PlayerInfo[playerid][pAdmin], "Name", PlayerInfo[playerid][pName]);
    mysql_SetInt("accountsdm", "SpawnLoc", PlayerInfo[playerid][pSpawnLoc], "Name", PlayerInfo[playerid][pName]);
    }
    }
    return 1;
    }


    Diese Sachen werden alle richtig abgespeichert. Nur SpawnLoc wird nicht abgespeichert.. Aber wieso?

  • Oben steht ja der Stock zum abspeichern.
    Hier ist mein stock zum Laden:


    stock LoadPlayer(playerid)
    {
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
    GetPlayerName(playerid, PlayerInfo[playerid][pName], MAX_PLAYER_NAME);
    GivePlayerMoney(playerid,mysql_GetInt("accountsdm", "Geld", "Name", PlayerInfo[playerid][pName]));
    SetPlayerScore(playerid, mysql_GetInt("accountsdm", "Level", "Name", PlayerInfo[playerid][pName]));
    PlayerInfo[playerid][pKills] = mysql_GetInt("accountsdm","Morde","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pDeaths] = mysql_GetInt("accountsdm","Tode","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pAdmin] = mysql_GetInt("accountsdm","AdminLevel","Name",PlayerInfo[playerid][pName]);
    PlayerInfo[playerid][pSpawnLoc] = mysql_GetInt("accountsdm","SpawnLoc","Name",PlayerInfo[playerid][pName]);
    }
    return 1;
    }

  • Tabelle

    Spoiler anzeigen
    [table=5]
    [*]Name
    [*]Type
    [*]Lenght
    [*]Decimals
    [*]Allow Null
    [*]Name
    [*]varchar
    [*]35
    [*]'0'
    [*]No
    [*]Passwort
    [*]varchar
    [*]35
    [*]'0'
    [*]No
    [*]Geld
    [*]int
    [*]11
    [*]'0'
    [*]No
    [*]Level
    [*]int
    [*]11
    [*]'0'
    [*]No
    [*]Morde
    [*]int
    [*]11
    [*]'0'
    [*]No
    [*]Tode
    [*]int
    [*]11
    [*]'0'
    [*]No
    [*]AdminLevel
    [*]int
    [*]11
    [*]'0'
    [*]No
    [*]SpawnLoc
    [*]int
    [*]11
    [*]'0'
    [*]No
    [/table]


    MySQL Log

    Spoiler anzeigen
    121116 12:38:25 [Note] Plugin 'FEDERATED' is disabled.
    121116 12:38:25 InnoDB: The InnoDB memory heap is disabled
    121116 12:38:25 InnoDB: Mutexes and rw_locks use Windows interlocked functions
    121116 12:38:25 InnoDB: Compressed tables use zlib 1.2.3
    121116 12:38:25 InnoDB: Initializing buffer pool, size = 16.0M
    121116 12:38:25 InnoDB: Completed initialization of buffer pool
    121116 12:38:25 InnoDB: highest supported file format is Barracuda.
    121116 12:38:26 InnoDB: Waiting for the background threads to start
    121116 12:38:27 InnoDB: 1.1.8 started; log sequence number 1595675
    121116 12:38:27 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    121116 12:38:27 [Note] - '0.0.0.0' resolves to '0.0.0.0';
    121116 12:38:27 [Note] Server socket created on IP: '0.0.0.0'.
    121116 12:38:28 [Note] Event Scheduler: Loaded 0 events
    121116 12:38:28 [Note] C:\xampp\mysql\bin\mysqld.exe: ready for connections.
    Version: '5.5.27' socket: '' port: 3306 MySQL Community Server (GPL)
    121117 5:47:07 [Note] C:\xampp\mysql\bin\mysqld.exe: Normal shutdown

    Spoiler anzeigen
    121117 5:47:09 [Note] Event Scheduler: Purging the queue. 0 events
    121117 5:47:11 InnoDB: Starting shutdown...
    121117 5:47:19 InnoDB: Shutdown completed; log sequence number 1595675
    121117 5:47:20 [Note] C:\xampp\mysql\bin\mysqld.exe: Shutdown complete

    Spoiler anzeigen
    121117 13:55:01 [Note] Plugin 'FEDERATED' is disabled.
    121117 13:55:02 InnoDB: The InnoDB memory heap is disabled
    121117 13:55:02 InnoDB: Mutexes and rw_locks use Windows interlocked functions
    121117 13:55:02 InnoDB: Compressed tables use zlib 1.2.3
    121117 13:55:02 InnoDB: Initializing buffer pool, size = 16.0M
    121117 13:55:02 InnoDB: Completed initialization of buffer pool
    121117 13:55:02 InnoDB: highest supported file format is Barracuda.
    121117 13:55:03 InnoDB: Waiting for the background threads to start
    121117 13:55:04 InnoDB: 1.1.8 started; log sequence number 1595675
    121117 13:55:04 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    121117 13:55:04 [Note] - '0.0.0.0' resolves to '0.0.0.0';
    121117 13:55:04 [Note] Server socket created on IP: '0.0.0.0'.
    121117 13:55:04 [Note] Event Scheduler: Loaded 0 events
    121117 13:55:04 [Note] C:\xampp\mysql\bin\mysqld.exe: ready for connections.
    Version: '5.5.27' socket: '' port: 3306 MySQL Community Server (GPL)
    121118 2:14:15 [Note] C:\xampp\mysql\bin\mysqld.exe: Normal shutdown

    Spoiler anzeigen
    121118 2:14:16 [Note] Event Scheduler: Purging the queue. 0 events
    121118 2:14:18 InnoDB: Starting shutdown...
    121118 2:14:29 InnoDB: Shutdown completed; log sequence number 1595675
    121118 2:14:30 [Note] C:\xampp\mysql\bin\mysqld.exe: Shutdown complete

    Spoiler anzeigen
    121118 11:10:01 [Note] Plugin 'FEDERATED' is disabled.
    121118 11:10:02 InnoDB: The InnoDB memory heap is disabled
    121118 11:10:02 InnoDB: Mutexes and rw_locks use Windows interlocked functions
    121118 11:10:02 InnoDB: Compressed tables use zlib 1.2.3
    121118 11:10:02 InnoDB: Initializing buffer pool, size = 16.0M
    121118 11:10:02 InnoDB: Completed initialization of buffer pool
    121118 11:10:02 InnoDB: highest supported file format is Barracuda.
    121118 11:10:06 InnoDB: Waiting for the background threads to start
    121118 11:10:07 InnoDB: 1.1.8 started; log sequence number 1595675
    121118 11:10:07 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    121118 11:10:07 [Note] - '0.0.0.0' resolves to '0.0.0.0';
    121118 11:10:07 [Note] Server socket created on IP: '0.0.0.0'.
    121118 11:10:37 [Note] Event Scheduler: Loaded 0 events
    121118 11:10:37 [Note] C:\xampp\mysql\bin\mysqld.exe: ready for connections.
    Version: '5.5.27' socket: '' port: 3306 MySQL Community Server (GPL)
    121119 5:37:32 [Note] Plugin 'FEDERATED' is disabled.
    121119 5:37:35 InnoDB: The InnoDB memory heap is disabled
    121119 5:37:35 InnoDB: Mutexes and rw_locks use Windows interlocked functions
    121119 5:37:35 InnoDB: Compressed tables use zlib 1.2.3
    121119 5:37:35 InnoDB: Initializing buffer pool, size = 16.0M
    121119 5:37:35 InnoDB: Completed initialization of buffer pool
    121119 5:37:38 InnoDB: highest supported file format is Barracuda.
    121119 5:37:41 InnoDB: Waiting for the background threads to start
    121119 5:37:42 InnoDB: 1.1.8 started; log sequence number 1595675
    121119 5:37:42 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    121119 5:37:45 [Note] - '0.0.0.0' resolves to '0.0.0.0';
    121119 5:37:45 [Note] Server socket created on IP: '0.0.0.0'.
    121119 5:37:45 [Note] Event Scheduler: Loaded 0 events
    121119 5:37:45 [Note] C:\xampp\mysql\bin\mysqld.exe: ready for connections.
    Version: '5.5.27' socket: '' port: 3306 MySQL Community Server (GPL)
    121119 7:23:36 [Note] C:\xampp\mysql\bin\mysqld.exe: Normal shutdown

    Spoiler anzeigen
    121119 7:23:36 [Note] Event Scheduler: Purging the queue. 0 events
    121119 7:23:37 InnoDB: Starting shutdown...
    121119 7:23:46 InnoDB: Shutdown completed; log sequence number 1595675
    121119 7:23:47 [Note] C:\xampp\mysql\bin\mysqld.exe: Shutdown complete

    Spoiler anzeigen
    121119 10:38:32 [Note] Plugin 'FEDERATED' is disabled.
    121119 10:38:33 InnoDB: The InnoDB memory heap is disabled
    121119 10:38:33 InnoDB: Mutexes and rw_locks use Windows interlocked functions
    121119 10:38:33 InnoDB: Compressed tables use zlib 1.2.3
    121119 10:38:33 InnoDB: Initializing buffer pool, size = 16.0M
    121119 10:38:33 InnoDB: Completed initialization of buffer pool
    121119 10:38:33 InnoDB: highest supported file format is Barracuda.
    121119 10:38:33 InnoDB: Waiting for the background threads to start
    121119 10:38:34 InnoDB: 1.1.8 started; log sequence number 1595675
    121119 10:38:34 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    121119 10:38:34 [Note] - '0.0.0.0' resolves to '0.0.0.0';
    121119 10:38:34 [Note] Server socket created on IP: '0.0.0.0'.
    121119 10:38:35 [Note] Event Scheduler: Loaded 0 events
    121119 10:38:35 [Note] C:\xampp\mysql\bin\mysqld.exe: ready for connections.
    Version: '5.5.27' socket: '' port: 3306 MySQL Community Server (GPL)


    Was meinst du mit Serverlog?

  • MySQL Log (vom abspeichern):


    Code
    [13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(accountsdm); - Escaped 10 characters to accountsdm.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Geld); - Escaped 4 characters to Geld.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Sh12); - Escaped 4 characters to Sh12.[13:11:33] >> mysql_query( Connection handle: 1 )[13:11:33] CMySQLHandler::Query(UPDATE `accountsdm` SET `Geld` = '0' WHERE `Name` = 'Sh12') - Successfully executed.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(accountsdm); - Escaped 10 characters to accountsdm.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Level); - Escaped 5 characters to Level.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Sh12); - Escaped 4 characters to Sh12.[13:11:33] >> mysql_query( Connection handle: 1 )[13:11:33] CMySQLHandler::Query(UPDATE `accountsdm` SET `Level` = '0' WHERE `Name` = 'Sh12') - Successfully executed.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(accountsdm); - Escaped 10 characters to accountsdm.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Morde); - Escaped 5 characters to Morde.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Sh12); - Escaped 4 characters to Sh12.[13:11:33] >> mysql_query( Connection handle: 1 )[13:11:33] CMySQLHandler::Query(UPDATE `accountsdm` SET `Morde` = '0' WHERE `Name` = 'Sh12') - Successfully executed.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(accountsdm); - Escaped 10 characters to accountsdm.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Tode); - Escaped 4 characters to Tode.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Sh12); - Escaped 4 characters to Sh12.[13:11:33] >> mysql_query( Connection handle: 1 )[13:11:33] CMySQLHandler::Query(UPDATE `accountsdm` SET `Tode` = '0' WHERE `Name` = 'Sh12') - Successfully executed.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(accountsdm); - Escaped 10 characters to accountsdm.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(AdminLevel); - Escaped 10 characters to AdminLevel.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Sh12); - Escaped 4 characters to Sh12.[13:11:33] >> mysql_query( Connection handle: 1 )[13:11:33] CMySQLHandler::Query(UPDATE `accountsdm` SET `AdminLevel` = '1' WHERE `Name` = 'Sh12') - Successfully executed.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(accountsdm); - Escaped 10 characters to accountsdm.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(SpawnLoc); - Escaped 8 characters to SpawnLoc.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Name); - Escaped 4 characters to Name.[13:11:33] >> mysql_real_escape_string( Connection handle: 1 )[13:11:33] CMySQLHandler::EscapeString(Sh12); - Escaped 4 characters to Sh12.[13:11:33] >> mysql_query( Connection handle: 1 )[13:11:33] CMySQLHandler::Query(UPDATE `accountsdm` SET `SpawnLoc` = '0' WHERE `Name` = 'Sh12') - Successfully executed.


    server_log

    Code
    ----------Loaded log file: "server_log.txt".----------SA-MP Dedicated Server----------------------v0.3e-R2, (C)2005-2012 SA-MP Team[13:10:52] [13:10:52] Server Plugins[13:10:52] --------------[13:10:52]  Loading plugin: mysql[13:10:53]   > MySQL plugin R5 successfully loaded.[13:10:53]   Loaded.[13:10:53]  Loaded 1 plugins.[13:10:53] [13:10:53] Ban list[13:10:53] --------[13:10:53]  Loaded: samp.ban[13:10:53] [13:10:53] [13:10:53] Filterscripts[13:10:53] ---------------[13:10:53]   Loading filterscript 'lspd.amx'...[13:10:53]   Loaded 1 filterscripts.[13:10:53] <-| [MYSQL] Verbindung zur Datenbank wurde erfolgreich hergestellt![13:10:53] ----------------------------------[13:10:53]  German Team Deatchmatch [TDM] loadet...[13:10:53] ----------------------------------[13:10:53] Number of vehicle models: 32