MySQL Lese Fehler

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
  • Lieben User,


    Ich bin seit einer zeit dabei einen SAMP Server zu schreiben,
    Leider ist mir wohl ein fehler beim Laden unterlaufen. Leider weiß ich nicht woran es Liegt hier mal den Error der MYSQL Log:

    SQL
    [20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("level")[20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("money")[20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("spawnchange")[20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("hp")[20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("alevel")[20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("frak")[20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("frang")[20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("donator")[20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("carkeys")



    Hier der SAMP Code:
    public OnCheckPassword(playerid){new num_fields,num_rows; cache_get_data(num_rows,num_fields,database); if(num_rows==1) { //load player[playerid][level] = cache_get_field_content_int(0,"level",database); player[playerid][money] = cache_get_field_content_int(0,"money",database); player[playerid][spawnchange] = cache_get_field_content_int(0,"spawnchange",database); player[playerid][hp] = cache_get_field_content_int(0,"hp",database); player[playerid][alevel] = cache_get_field_content_int(0,"alevel",database); player[playerid][frak] = cache_get_field_content_int(0,"frak",database); player[playerid][frang] = cache_get_field_content_int(0,"frang",database); player[playerid][donator] = cache_get_field_content_int(0,"donator",database); player[playerid][carkeys] = cache_get_field_content_int(0,"carkeys",database); player[playerid][db_id] = cache_get_field_content_int(0,"id",database); SetPlayerScore(playerid, player[playerid][level]); GivePlayerMoney(playerid, player[playerid][money]); SetPlayerHealth(playerid,player[playerid][hp]); SendClientMessage(playerid, COLOR_RED, player[playerid][alevel]); } else { SendClientMessage(playerid,COLOR_RED,"Das Passwort ist falsch."); ShowPlayerDialog(playerid,LOGIN_D,DIALOG_STYLE_PASSWORD,"Login","Gibt dein Passwort ein:","Okay","Abbrechen"); } return 1;}



    Würde mich über schnelle hilfe freuen.

  • Herzlich Willkommen im Breadfish Forum.

    Danke und hier die Codes:


    SQL
    [20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("level")
    [20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("money")
    [20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("spawnchange")
    [20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("hp")
    [20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("alevel")
    [20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("frak")
    [20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("frang")
    [20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("donator")
    [20:23:05] [WARNING] CMySQLResult::GetRowDataByName - field not found ("carkeys")




    public OnCheckPassword(playerid)
    {
    new num_fields,num_rows;
    cache_get_data(num_rows,num_fields,database);
    if(num_rows==1)
    {
    //load
    player[playerid][level] = cache_get_field_content_int(0,"level",database);
    player[playerid][money] = cache_get_field_content_int(0,"money",database);
    player[playerid][spawnchange] = cache_get_field_content_int(0,"spawnchange",database);
    player[playerid][hp] = cache_get_field_content_int(0,"hp",database);
    player[playerid][alevel] = cache_get_field_content_int(0,"alevel",database);
    player[playerid][frak] = cache_get_field_content_int(0,"frak",database);
    player[playerid][frang] = cache_get_field_content_int(0,"frang",database);
    player[playerid][donator] = cache_get_field_content_int(0,"donator",database);
    player[playerid][carkeys] = cache_get_field_content_int(0,"carkeys",database);
    player[playerid][db_id] = cache_get_field_content_int(0,"id",database);
    SetPlayerScore(playerid, player[playerid][level]);
    GivePlayerMoney(playerid, player[playerid][money]);
    SetPlayerHealth(playerid,player[playerid][hp]);
    SendClientMessage(playerid, COLOR_RED, player[playerid][alevel]);
    }
    else
    {
    //Passwort falsch
    SendClientMessage(playerid,COLOR_RED,"Das eingegebene Passwort ist falsch.");
    ShowPlayerDialog(playerid,LOGIN_D,DIALOG_STYLE_PASSWORD,"Login","Gibt bitte dein Passwort ein:","Okay","Abbrechen");
    }
    return 1;
    }

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • public OnCheckPassword(playerid)
    {
    new num_fields,num_rows;
    cache_get_data(num_rows,num_fields,database);
    if(num_rows==1)
    {
    //load
    players[playerid][level] = cache_get_field_content_int(0,"level",database);
    players[playerid][money] = cache_get_field_content_int(0,"money",database);
    players[playerid][spawnchange] = cache_get_field_content_int(0,"spawnchange",database);
    players[playerid][hp] = cache_get_field_content_int(0,"hp",database);
    players[playerid][alevel] = cache_get_field_content_int(0,"alevel",database);
    players[playerid][frak] = cache_get_field_content_int(0,"frak",database);
    players[playerid][frang] = cache_get_field_content_int(0,"frang",database);
    players[playerid][donator] = cache_get_field_content_int(0,"donator",database);
    players[playerid][carkeys] = cache_get_field_content_int(0,"carkeys",database);
    players[playerid][db_id] = cache_get_field_content_int(0,"id",database);
    SetPlayerScore(playerid, players[playerid][level]);
    GivePlayerMoney(playerid, players[playerid][money]);
    SetPlayerHealth(playerid,players[playerid][hp]);
    SendClientMessage(playerid, COLOR_RED, players[playerid][alevel]);
    }
    else
    {
    //Passwort falsch
    SendClientMessage(playerid,COLOR_RED,"Das eingegebene Passwort ist falsch.");
    ShowPlayerDialog(playerid,LOGIN_D,DIALOG_STYLE_PASSWORD,"Login","Gibt bitte dein Passwort ein:","Okay","Abbrechen");
    }
    return 1;
    }


    mache es so du hast
    player[playerid][level]


    Es muss aber


    players[playerid][level]


  • enum players{
    db_id,
    level,
    money,
    spawnchange,
    hp,
    alevel,
    frak,
    frang,
    donator,
    carkeys
    }
    new player[MAX_PLAYERS][players];[pwn]





    C:\Program Files (x86)\RockStar Games\Grand Theft Auto San Andreas - Multiplayer\SA-MP Server\gamemodes\BE.pwn(399) : error 028: invalid subscript (not an array or too many subscripts): "players"
    C:\Program Files (x86)\RockStar Games\Grand Theft Auto San Andreas - Multiplayer\SA-MP Server\gamemodes\BE.pwn(399) : warning 215: expression has no effect
    C:\Program Files (x86)\RockStar Games\Grand Theft Auto San Andreas - Multiplayer\SA-MP Server\gamemodes\BE.pwn(399) : error 001: expected token: ";", but found "]"
    C:\Program Files (x86)\RockStar Games\Grand Theft Auto San Andreas - Multiplayer\SA-MP Server\gamemodes\BE.pwn(399) : error 029: invalid expression, assumed zero
    C:\Program Files (x86)\RockStar Games\Grand Theft Auto San Andreas - Multiplayer\SA-MP Server\gamemodes\BE.pwn(399) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.

  • Mach mal
    new SpielerInfo[MAX_PLAYERS][SpielerEnum];
    Änder mal den Enum namen zu SpielerEnum und dann musst du alle player zu SpielerInfo umbenennen.
    lg


    Tut mir Leid, aber weißt du überhaupt wovon du redest? Das ganze wird keinen Unterschied machen!
    So, zum Thread Ersteller: Nenn mal bitte id in der Tabelle zu db_id um.


    Homez 8)


  • [16:46:10] [WARNING] CMySQLResult::GetRowDataByName - field not found ("level")
    [16:46:10] [WARNING] CMySQLResult::GetRowDataByName - field not found ("money")
    [16:46:10] [WARNING] CMySQLResult::GetRowDataByName - field not found ("spawnchange")
    [16:46:10] [WARNING] CMySQLResult::GetRowDataByName - field not found ("hp")
    [16:46:10] [WARNING] CMySQLResult::GetRowDataByName - field not found ("alevel")
    [16:46:10] [WARNING] CMySQLResult::GetRowDataByName - field not found ("frak")
    [16:46:10] [WARNING] CMySQLResult::GetRowDataByName - field not found ("frang")
    [16:46:10] [WARNING] CMySQLResult::GetRowDataByName - field not found ("donator")
    [16:46:10] [WARNING] CMySQLResult::GetRowDataByName - field not found ("carkeys")

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen