Server Crasht beim Laden | MySQL R5

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
  • heyho,
    ich habe nen spieler laden stock geschrieben, nur crashed der server, noch bevor er anfängt ein feld auszulesen, wo ist hier der fehler?

    stock LoadPlayer(playerid)
    {
    new query[128],data[1000];
    format(query,sizeof(query),"SELECT * FROM accounts WHERE `Name`='%s'",SpielerName(playerid));
    mysql_query(query);
    mysql_store_result();
    if(mysql_num_rows())
    {
    if(mysql_retrieve_row())
    {
    //HIERHER
    mysql_fetch_field_row(data,"Geld");
    GivePlayerMoney(playerid,strval(data));
    print(data);
    mysql_fetch_field_row(data,"banned");
    User[playerid][banned]=strval(data);
    mysql_fetch_field_row(data,"Bank");
    User[playerid][Bank]=strval(data);
    mysql_fetch_field_row(data,"Level");
    SetPlayerScore(playerid,strval(data));
    mysql_fetch_field_row(data,"Adminlevel");
    User[playerid][Adminlevel]=strval(data);
    mysql_fetch_field_row(data,"Userrat");
    User[playerid][Userrat]=strval(data);
    mysql_fetch_field_row(data,"UserratLeader");
    User[playerid][UserratLeader]=strval(data);
    mysql_fetch_field_row(data,"ExistenzLeader");
    User[playerid][ExistenzLeader]=strval(data);
    mysql_fetch_field_row(data,"Existenz");
    User[playerid][Existenz]=strval(data);
    mysql_fetch_field_row(data,"CMDallow");
    User[playerid][CMDallow]=strval(data);
    mysql_fetch_field_row(data,"Werkzeugkasten");
    User[playerid][Werkzeugkasten]=strval(data);
    mysql_fetch_field_row(data,"HangarKey");
    User[playerid][HangarKey]=strval(data);
    mysql_fetch_field_row(data,"Leader");
    User[playerid][Leader]=strval(data);
    mysql_fetch_field_row(data,"Member");
    User[playerid][Member]=strval(data);
    mysql_fetch_field_row(data,"InPrison");
    User[playerid][InPrison]=strval(data);
    mysql_fetch_field_row(data,"PrisonCPsgelaufen");
    User[playerid][PrisonCPsgelaufen]=strval(data);
    mysql_fetch_field_row(data,"PrisonCPsgegeben");
    User[playerid][PrisonCPsgegeben]=strval(data);
    mysql_fetch_field_row(data,"Rang");
    User[playerid][Rang]=strval(data);
    mysql_fetch_field_row(data,"Skin");
    User[playerid][Skin]=strval(data);
    mysql_fetch_field_row(data,"Skilllevel");
    User[playerid][Skilllevel]=strval(data);
    mysql_fetch_field_row(data,"Skillpunkte");
    User[playerid][Skillpunkte]=strval(data);
    mysql_fetch_field_row(data,"ZeitzumSkillpunkt");
    User[playerid][ZeitzumSkillpunkt]=strval(data);
    mysql_fetch_field_row(data,"ZeitseidSkillpunkt");
    User[playerid][ZeitseidSkillpunkt]=strval(data);
    }
    }
    mysql_free_result();
    return 1;
    }

  • Beavis:
    Crashdetect

    [19:08:20] [debug] Server crashed while executing Just.amx
    [19:08:20] [debug] AMX backtrace:
    [19:08:20] [debug] #0 native mysql_fetch_field_row () [100065e0] from mysql.DLL
    [19:08:20] [debug] #1 0003320c in LoadPlayer (playerid=0) at C:\Users\Arbeits-PC\Desktop\bedrohung projekt\gamemodes\Just.pwn:4310
    [19:08:20] [debug] #2 00027d70 in public OnDialogResponse (playerid=0, dialogid=2, response=1, listitem=-1, inputtext[]=@0x0016da60 "test") at C:\Users\Arbeits-PC\Desktop\bedrohung projekt\gamemodes\Just.pwn:3187
    [19:08:21] [debug] Native backtrace:
    [19:08:21] [debug] #0 7519b9f0 in ?? () from C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCR90.dll
    [19:08:21] [debug] #1 100090b4 in ?? () from C:\Users\Arbeits-PC\Desktop\bedrohung projekt\plugins\mysql.DLL
    [19:08:21] [debug] #2 100066b3 in ?? () from C:\Users\Arbeits-PC\Desktop\bedrohung projekt\plugins\mysql.DLL
    [19:08:21] [debug] #3 004010b6 in ?? () from C:\Users\Arbeits-PC\Desktop\bedrohung projekt\samp-server.exe
    [19:08:21] [debug] #4 6cb45f2a in ?? () from C:\Users\Arbeits-PC\Desktop\bedrohung projekt\plugins\crashdetect.DLL
    [19:08:21] [debug] #5 6cb4822e in ?? () from C:\Users\Arbeits-PC\Desktop\bedrohung projekt\plugins\crashdetect.DLL
    [19:08:21] [debug] #6 6cb3ff6f in ?? () from C:\Users\Arbeits-PC\Desktop\bedrohung projekt\plugins\crashdetect.DLL
    [19:08:21] [debug] #7 6cb45f7a in ?? () from C:\Users\Arbeits-PC\Desktop\bedrohung projekt\plugins\crashdetect.DLL
    [19:08:21] [debug] #8 0046da61 in ?? () from C:\Users\Arbeits-PC\Desktop\bedrohung projekt\samp-server.exe
    [19:08:21] [debug] #9 004527d0 in ?? () from C:\Users\Arbeits-PC\Desktop\bedrohung projekt\samp-server.exe
    [19:08:21] [debug] #10 0047dac5 in ?? () from C:\Users\Arbeits-PC\Desktop\bedrohung projekt\samp-server.exe


    mysql log

    [19:08:18] >> mysql_real_escape_string( Connection handle: 1 )


    [19:08:18] CMySQLHandler::EscapeString(Die_Bedronung_WC); - Escaped 16 characters to Die_Bedronung_WC.


    [19:08:18] >> mysql_query( Connection handle: 1 )


    [19:08:18] CMySQLHandler::Query(SELECT * FROM `accounts` WHERE `Name` = 'Die_Bedronung_WC') - Successfully executed.


    [19:08:18] >> mysql_store_result( Connection handle: 1 )


    [19:08:18] CMySQLHandler::StoreResult() - Result was stored.


    [19:08:18] >> mysql_num_rows( Connection handle: 1 )


    [19:08:18] CMySQLHandler::NumRows() - Returned 1 row(s)


    [19:08:18] >> mysql_free_result( Connection handle: 1 )


    [19:08:18] CMySQLHandler::FreeResult() - Result was successfully free'd.


    [19:08:20] >> mysql_real_escape_string( Connection handle: 1 )


    [19:08:20] CMySQLHandler::EscapeString(Die_Bedronung_WC); - Escaped 16 characters to Die_Bedronung_WC.


    [19:08:20] >> mysql_query( Connection handle: 1 )


    [19:08:20] CMySQLHandler::Query(SELECT `passwort` FROM `accounts` WHERE `Name` = 'Die_Bedronung_WC') - Successfully executed.


    [19:08:20] >> mysql_store_result( Connection handle: 1 )


    [19:08:20] CMySQLHandler::StoreResult() - Result was stored.


    [19:08:20] >> mysql_fetch_row_format( Connection handle: 1 )


    [19:08:20] CMySQLHandler::FetchRow() - Return: test


    [19:08:20] >> mysql_free_result( Connection handle: 1 )


    [19:08:20] CMySQLHandler::FreeResult() - Result was successfully free'd.


    [19:08:20] >> mysql_query( Connection handle: 1 )


    [19:08:20] CMySQLHandler::Query(SELECT * FROM accounts WHERE `Name`='Die_Bedronung_WC') - Successfully executed.


    [19:08:20] >> mysql_store_result( Connection handle: 1 )


    [19:08:20] CMySQLHandler::StoreResult() - Result was stored.


    [19:08:20] >> mysql_num_rows( Connection handle: 1 )


    [19:08:20] CMySQLHandler::NumRows() - Returned 1 row(s)


    [19:08:20] >> mysql_retrieve_row( Connection handle: 1 )


    [19:08:20] >> mysql_fetch_field_row( Connection handle: 1 )