Biz klappt nicht

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


    ich habe ein Bizsystem aber es klappt nicht kriege dauernt Errors!


    if(dialogid == SELL_BIZ_03)
    {
    new string[128];
    if(!response) return 1;
    {
    if(IsPlayerConnected(ReturnUser(inputtext)))
    {
    if(ReturnUser(inputtext) != INVALID_PLAYER_ID)
    {
    accept_sell_money[ReturnUser(inputtext)] = sell_money[playerid];
    accept_sell_id[ReturnUser(inputtext)] = playerid;
    sell_biz[playerid] = true;
    format(string, sizeof(string), "* Spieler %s möchte dir sein Unternehmen verkaufen für $%d. (/accept business)", UserName(playerid),sell_money[playerid]);// 60290
    SendClientMessage(ReturnUser(inputtext), COLOR_LIGHTBLUE, string);
    return 1;
    }
    }
    }
    }



    if(dialogid == SELL_BIZ+1)
    {
    new sendername [MAX_PLAYER_NAME];
    GetPlayerName(playerid,sendername,sizeof(sendername));
    if(PlayerInfo[playerid][pPbiskey] >= 100 && strcmp(sendername, SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbOwner], true) == 0)
    {
    new string[128];
    new bouse = PlayerInfo[playerid][pPbiskey]-100;
    new bizprice = SBizzInfo[bouse][sbBuyPrice];
    PlayerMoney[playerid] = PlayerMoney[playerid] += SBizzInfo[bouse][sbTill];
    PlayerMoney[playerid] = PlayerMoney[playerid] += bizprice/4;
    SBizzInfo[bouse][sbLocked] = 1;
    SBizzInfo[bouse][sbOwned] = 0;
    strmid(SBizzInfo[bouse][sbOwner], "Der Staat", 0, strlen("Der Staat"), 255);
    strmid(SBizzInfo[bouse][sbExtortion], "Niemand", 0, strlen("Niemand"), 255);
    ConsumingMoney[playerid] = 1;
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "~w~Herrzlichen Glueckwunsch~n~ Du hast dein Unternehmen fuer ~n~~g~$%d ~w~verkauft", SBizzInfo[bouse][sbTill]);
    GameTextForPlayer(playerid, string, 10000, 3);
    SBizzInfo[bouse][sbTill] = 0;
    OnPropUpdate();
    PlayerUpdate(playerid);
    SBizzInfo[PlayerInfo[playerid][pPbiskey]-100][sbMessage],// 60220,60220 -- 60221
    PlayerInfo[playerid][pPbiskey];
    PlayerInfo[playerid][pPbiskey] = 255;
    return 1;
    }
    if(strcmp(sendername, BizzInfo[PlayerInfo[playerid][pPbiskey]][bOwner], true) == 0)
    {
    new string[128];
    GetPlayerName(playerid,sendername,sizeof(sendername))
    new bouse = PlayerInfo[playerid][pPbiskey];// 60229
    BizzInfo[bouse][bLocked] = 1;
    BizzInfo[bouse][bOwned] = 0;
    strmid(BizzInfo[bouse][bOwner], "Der Staat", 0, strlen("Der Staat"), 255);
    strmid(BizzInfo[bouse][bExtortion], "Niemand", 0, strlen("Niemand"), 255);
    ConsumingMoney[playerid] = 1;
    new bizprice = BizzInfo[bouse][bBuyPrice];
    PlayerMoney[playerid] = PlayerMoney[playerid] += bizprice/4;
    PlayerMoney[playerid] = PlayerMoney[playerid] += BizzInfo[bouse][bTill];
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "~w~Herrzlichen Glueckwunsch~n~ Du hast dein Unternehmen fuer ~n~~g~$%d ~w~verkauft", BizzInfo[bouse][bTill]);
    GameTextForPlayer(playerid, string, 10000, 3);
    BizzInfo[bouse][bTill] = 0;
    OnPropUpdate();
    PlayerUpdate(playerid);
    BizzInfo[PlayerInfo[playerid][pPbiskey]][bMessage],// 60244, 60244 -- 60245
    PlayerInfo[playerid][pPbiskey];
    PlayerInfo[playerid][pPbiskey] = 255;
    return 1;
    }
    }



    C:\Users\Moritz\Desktop\LoD Script\gamemodes\Release.pwn(60221) : warning 215: expression has no effect
    C:\Users\Moritz\Desktop\LoD Script\gamemodes\Release.pwn(60221 -- 60222) : warning 215: expression has no effect
    C:\Users\Moritz\Desktop\LoD Script\gamemodes\Release.pwn(60231) : error 001: expected token: ";", but found "new"
    C:\Users\Moritz\Desktop\LoD Script\gamemodes\Release.pwn(60246) : warning 215: expression has no effect
    C:\Users\Moritz\Desktop\LoD Script\gamemodes\Release.pwn(60246 -- 60247) : warning 215: expression has no effect
    C:\Users\Moritz\Desktop\LoD Script\gamemodes\Release.pwn(60265) : warning 219: local variable "string" shadows a variable at a preceding level
    C:\Users\Moritz\Desktop\LoD Script\gamemodes\Release.pwn(60292) : error 017: undefined symbol "UserName"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    2 Errors.


    Hoffe es kann wer helfen


    Mfg


    Moritz

  • enum sbInfo
    {
    sbOwned,
    sbOwner[64],
    sbMessage[128],
    sbExtortion[MAX_PLAYER_NAME],
    Float:sbEntranceX,
    Float:sbEntranceY,
    Float:sbEntranceZ,
    sbLevelNeeded,
    sbBuyPrice,
    sbEntranceCost,
    sbTill,
    sbLocked,
    sbInterior,
    sbProducts,
    sbMaxProducts,
    sbPriceProd,
    Text3D:sbText,
    };


    Habe ich schon, habe die Erros behoben, nurnoch einen Error:


    new bouse = PlayerInfo[playerid][pPbiskey];


    error 001: expected token: ";", but found "new"