Array must be indexed
#5

Why are you using else if you can just use else in that case, you're checking if the house has owner already.
pawn Код:
if(!strcmp(AHouseData[HouseID][Owner], Name, false))
{
    hLevel = AHouseData[HouseID][HouseLevel];
    SetPlayerVirtualWorld(playerid, 5000 + HouseID);
    SetPlayerInterior(playerid, AHouseInteriors[hLevel][InteriorID]);
    printf("SetPlayerInterior(%d, %d);", playerid, AHouseInteriors[hLevel][InteriorID]);
    SetPlayerPos(playerid, AHouseInteriors[hLevel][IntX], AHouseInteriors[hLevel][IntY], AHouseInteriors[hLevel][IntZ]);
    printf("SetPlayerPos(%d, %f, %f, %f);", playerid, AHouseInteriors[hLevel][IntX], AHouseInteriors[hLevel][IntY], AHouseInteriors[hLevel][IntZ]);

    APlayerData[playerid][CurrentHouse] = HouseID;
    SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}Use {FFFF00}/housemenu{FFFF00} to change options for your house");
    return 1;
}
else
{
    print("else called!");
}
Reply


Messages In This Thread
Array must be indexed - by Proxus - 13.02.2019, 17:24
Re: Array must be indexed - by Terzic - 13.02.2019, 17:40
Re: Array must be indexed - by Pottus - 13.02.2019, 17:58
Re: Array must be indexed - by Proxus - 13.02.2019, 18:38
Re: Array must be indexed - by d3Pedro - 13.02.2019, 18:46
Re: Array must be indexed - by Proxus - 13.02.2019, 20:04
Re: Array must be indexed - by d3Pedro - 13.02.2019, 20:17
Re: Array must be indexed - by Proxus - 14.02.2019, 05:45
Re: Array must be indexed - by Proxus - 14.02.2019, 16:08

Forum Jump:


Users browsing this thread: 1 Guest(s)