Error's ? Help
#1

I get Gagi's FilterScript for houses, and I add it on my GameMode, but I got errors on line
pawn Код:
case DIALOG_HOUSE:
Error's are:
Код:
XoomerRP.pwn(1169) : error 014: invalid statement; not in switch
XoomerRP.pwn(1169) : error 001: expected token: ";", but found ":"
XoomerRP.pwn(1169) : error 029: invalid expression, assumed zero
XoomerRP.pwn(1169) : fatal error 107: too many error messages on one line
There is dialog:

pawn Код:
case DIALOG_HOUSE:
            {
            if(!response)
            {
            new string[200];
                case 0: {
                new id = Player[playerid][Houseid];
                if(id == 999) return SCM(playerid,COLOR_RED,"Greљka: Ne posjedujeљ kuću");
                if(!IsPlayerInRangeOfPoint(playerid,3.0,House[id][EnterX],House[id][EnterY],House[id][EnterZ])) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"You are not near your house");
                format(House[id][Owner], 32, "Drћava");
                if(House[id][hCar] > 0) format(HouseOwner[House[id][hCar]],64,"Drћava");
                House[id][On_Sell] = 1;
                Player[playerid][Houseid] = 999;
                GivePlayerMoney(playerid,House[id][Price]/2);
                DestroyDynamicPickup(House[id][PickupU]);
                House[id][PickupU] = CreateDynamicPickup(1273, 23,  House[id][EnterX],House[id][EnterY],House[id][EnterZ],-1,-1,-1,100.0);
                DestroyDynamicMapIcon(House[id][Icon]);
                House[id][Icon] = CreateDynamicMapIcon(House[id][EnterX],House[id][EnterY],House[id][EnterZ], 31, 0, -1, -1, -1, 100.0);
                CheckHouse(id);
                UpdatePlayerInformation(playerid);
                format(string,sizeof(string),"%s\nOva kuća je na prodaju\n\n{29CC3F}Cijena %d\n{29CC3F}Level %d\n{29CC3F}Address: %s\nUkucaj /buyhouse da je kupiљ",House[id][HouseName],House[id][Price],House[id][Level],House[id][Address]);
                UpdateDynamic3DTextLabelText(House[id][DLabel],-1,string);
                }
Reply
#2

There is a case inside a case. Why?
Reply
#3

Quote:
Originally Posted by Siralos
Посмотреть сообщение
There is a case inside a case. Why?
DIALOG_STYLE_LIST, becouse that ?
Reply
#4

pawn Код:
if(dialogid == DIALOG_HOUSE && response==1)
    {
        switch(listitem)
        {
            case 0:
            {
                new string[256];
                new id = Player[playerid][Houseid];
                if(id == 999) return SCM(playerid,COLOR_RED,"Greљka: Ne posjedujeљ kucu");
                if(!IsPlayerInRangeOfPoint(playerid,3.0,House[id][EnterX],House[id][EnterY],House[id][EnterZ])) return SCM(playerid,COLOR_RED,"EROR: "COL_WHITE"You are not near your house");
                format(House[id][Owner], 32, "Drћava");
                if(House[id][hCar] > 0) format(HouseOwner[House[id][hCar]],64,"Drћava");
                House[id][On_Sell] = 1;
                Player[playerid][Houseid] = 999;
                GivePlayerMoney(playerid,House[id][Price]/2);
                DestroyDynamicPickup(House[id][PickupU]);
                House[id][PickupU] = CreateDynamicPickup(1273, 23,  House[id][EnterX],House[id][EnterY],House[id][EnterZ],-1,-1,-1,100.0);
                DestroyDynamicMapIcon(House[id][Icon]);
                House[id][Icon] = CreateDynamicMapIcon(House[id][EnterX],House[id][EnterY],House[id][EnterZ], 31, 0, -1, -1, -1, 100.0);
                CheckHouse(id);
                UpdatePlayerInformation(playerid);
                format(string,sizeof(string),"%s\nOva kuca je na prodaju\n\n{29CC3F}Cijena %d\n{29CC3F}Level %d\n{29CC3F}Address: %s\nUkucaj /buyhouse da je kupiљ",House[id][HouseName],House[id][Price],House[id][Level],House[id][Address]);
                UpdateDynamic3DTextLabelText(House[id][DLabel],-1,string);
            }
            case 1:
            {
            //Code
            }
           
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)