MYSQL - Problem

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
  • public LoadBizz()
    {
    new val[128],query[256];
    mysql_free_result();
    for(new idx=0; idx<sizeof(BizzInfo); idx++)
    {
    format(query, sizeof(query), "SELECT * FROM `bizz` WHERE `id`='%i'", idx);
    mysql_query(query);
    mysql_store_result();
    if(mysql_num_rows())
    {
    mysql_fetch_field("bowned",val);
    BizzInfo[idx][bOwned] = strval(val);
    mysql_fetch_field("bowner",BizzInfo[idx][bOwner]);
    mysql_fetch_field("bmessage",BizzInfo[idx][bMessage]);
    mysql_fetch_field("bextortion",BizzInfo[idx][bExtortion]);
    mysql_fetch_field("bentrancex",val);
    BizzInfo[idx][bEntranceX] = floatstr(val);
    mysql_fetch_field("bentrancey",val);
    BizzInfo[idx][bEntranceY] = floatstr(val);
    mysql_fetch_field("bentrancez",val);
    BizzInfo[idx][bEntranceZ] = floatstr(val);
    mysql_fetch_field("bexitx",val);
    BizzInfo[idx][bExitX] = floatstr(val);
    mysql_fetch_field("bexity",val);
    BizzInfo[idx][bExitY] = floatstr(val);
    mysql_fetch_field("bexitz",val);
    BizzInfo[idx][bExitZ] = floatstr(val);
    mysql_fetch_field("blevelneeded",val);
    BizzInfo[idx][bLevelNeeded] = strval(val);
    mysql_fetch_field("bbuyprice",val);
    BizzInfo[idx][bBuyPrice] = strval(val);
    mysql_fetch_field("bentrancecost",val);
    BizzInfo[idx][bEntranceCost] = strval(val);
    mysql_fetch_field("btill",val);
    BizzInfo[idx][bTill] = strval(val);
    mysql_fetch_field("blocked",val);
    BizzInfo[idx][bLocked] = strval(val);
    mysql_fetch_field("binterior",val);
    BizzInfo[idx][bInterior] = strval(val);
    mysql_fetch_field("bproducts",val);
    BizzInfo[idx][bProducts] = strval(val);
    mysql_fetch_field("bmaxproducts",val);
    BizzInfo[idx][bMaxProducts] = strval(val);
    mysql_fetch_field("bpriceprod",val);
    BizzInfo[idx][bPriceProd] = strval(val);
    mysql_fetch_field("bdate",val);
    BizzInfo[idx][bDate] = strval(val);
    }
    mysql_free_result();
    }
    print("Geschäfte geladen!");
    return 1;
    }
    //////////////////////////
    public LoadSBizz()
    {
    new val[128],query[256];
    for(new idx=0; idx<sizeof(SBizzInfo); idx++)
    {
    format(query, sizeof(query), "SELECT * FROM `sbizz` WHERE `sid`='%i'", idx);
    mysql_query(query);
    mysql_store_result();
    if(mysql_num_rows())
    {


    mysql_fetch_field("sbowned",val);
    SBizzInfo[idx][sbOwned] = strval(val);
    mysql_fetch_field("sbowner",SBizzInfo[idx][sbOwner]);
    mysql_fetch_field("sbmessage",SBizzInfo[idx][sbMessage]);
    mysql_fetch_field("sbextortion",SBizzInfo[idx][sbExtortion]);
    mysql_fetch_field("sbentrancex",val);
    SBizzInfo[idx][sbEntranceX] = floatstr(val);
    mysql_fetch_field("sbentrancey",val);
    SBizzInfo[idx][sbEntranceY] = floatstr(val);
    mysql_fetch_field("sbentrancez",val);
    SBizzInfo[idx][sbEntranceZ] = floatstr(val);
    mysql_fetch_field("sblevelneeded",val);
    SBizzInfo[idx][sbLevelNeeded] = strval(val);
    mysql_fetch_field("sbbuyprice",val);
    SBizzInfo[idx][sbBuyPrice] = strval(val);
    mysql_fetch_field("sbentrancecost",val);
    SBizzInfo[idx][sbEntranceCost] = strval(val);
    mysql_fetch_field("sbtill",val);
    SBizzInfo[idx][sbTill] = strval(val);
    mysql_fetch_field("sblocked",val);
    SBizzInfo[idx][sbLocked] = strval(val);
    mysql_fetch_field("sbinterior",val);
    SBizzInfo[idx][sbInterior] = strval(val);
    mysql_fetch_field("sbproducts",val);
    SBizzInfo[idx][sbProducts] = strval(val);
    mysql_fetch_field("sbmaxproducts",val);
    SBizzInfo[idx][sbMaxProducts] = strval(val);
    mysql_fetch_field("sbpriceprod",val);
    SBizzInfo[idx][sbPriceProd] = strval(val);
    mysql_fetch_field("sbdate",val);
    SBizzInfo[idx][sbDate] = strval(val);
    }
    mysql_free_result();
    }
    print("sGeschäfte geladen!");
    return 1;
    }

  • wie jetz? Häuser und BIze sind garnicht da. sie sind auf der Farm nähe BSN alle Icons auf einen haufen..


    EDIT : habe jetz herrausgefunden das nur die Accounts richtig geladen werden, nicht mal die Fraktzionskassen werden gespeichert



    Bitte Hilft mir.