error 001: expected token: ",", but found "}"
#1

Код:
//>>>error           case 1: { for(new h = 0; h < sizeof(HouseInfo); h++) format(string, sizeof(string), "~w~Ice utca %d.~n~Tulaj:%s",h,HouseInfo[h][hOwner] }
			}
		    }
		}
Reply
#2

try this
pawn Код:
case 1: { for(new h = 0; h < sizeof(HouseInfo); h++) format(string, sizeof(string), "~w~Ice utca %d.~n~Tulaj:%s",h,HouseInfo[h][hOwner]);
Reply
#3

You don't close the function.

However, what your code does is really pointless. It loops through all the houses and it formats a message but string will only keep the text for the last house.
Reply
#4

will not work properly?
Reply
#5

0 error thanks, [IND]Crazy
Reply
#6

It will compile if you close the function but it will not do what you want.
Reply
#7

I could do that good?, Can you help me?
Reply
#8

Sure I can, but you need to describe what you want to do.
Reply
#9

Код:
	for(new h = 0; h < sizeof(HouseInfo); h++)
			{
				if(HouseInfo[h][Van] != 1) continue;

				if(PlayerToPoint(3.0, i, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
				{
					if(HouseInfo[h][hOwned] == 1)
					{
						if(HouseInfo[h][hRentabil] == 0)
					//		format(string, sizeof(string), "~w~Ice utca %d.~n~Tulaj:%s",h,HouseInfo[h][hOwner]);
							ShowPlayerDialog(i, DIALOG_HOUSEM, DIALOG_STYLE_LIST, "Hбz","Belйp\nInformбciу", "OK", "Mйgsem");
Код:
else if( dialogid == DIALOG_HOUSEM )
{
    if(!response) return 1;
    if(response)
    {
        switch(listitem)
        {
            case 0:
                {
					BementIdo[playerid] = 3;
					new hazak = sizeof(HouseInfo);
				//	new PlayerVW = GetPlayerVirtualWorld(playerid), PlayerInt = GetPlayerInterior(playerid);
					if(IsAt(playerid,IsAt_HazElott) != NINCS)
					{
                        for(new i = 0; i < hazak; i++)
                        {
                            if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
                            {
                                if(HouseInfo[i][hLock] == 0)
                                {
                                    new HazBelso = HouseInfo[i][hBelso];
                                    SetPlayerInterior(playerid,IntInfo[HazBelso][iNumber]);
                                    SetPlayerPos(playerid,IntInfo[HazBelso][iExitX],IntInfo[HazBelso][iExitY],IntInfo[HazBelso][iExitZ]);
                                    SetPlayerVirtualWorld(playerid, i);
                                    GameTextForPlayer(playerid, "~w~Ьdv itt!", 5000, 1);
                                    PlayerInfo[playerid][pLocal] = i;
                                    Hazbanvan[playerid] = 1;
                                    new zseka = Fbios[playerid];
                                    SendFormatMessage(zseka, Pink, "PDA Ьzenet: %s bement a %d szбmъ hбzba.", PlayerName(playerid), i)
                                    SetPlayerMarkerForPlayer(zseka, playerid, COLOR_INVISIBLE);
                                   // return 1;
								}
								else
								{
									GameTextForPlayer(playerid, "~r~Zarva", 5000, 1);
									return 1;	
                                }
                            }
                        }
                    }
                }
            case 1: { for(new h = 0; h < sizeof(HouseInfo); h++) format(string, sizeof(string), "~w~Ice utca %d.~n~Tulaj:%s",h,HouseInfo[h][hOwner]); }
				}
			}
		}
Reply
#10

You didn't explain what you want to do though so I can only guess. Do you want to use the code of the first one into your switch? Even though the format line is commented and the if statement about hRentabil doesn't use brackets so it takes only one function inside its block.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)