07.10.2013, 22:11
PHP код:
new All[300], Locked[32], All1[300], All2[300], Houseidx;
Houseidx = HouseStatsHouseID[playerid];
if(HouseInfo[Houseidx][hDoors] == 0){Locked = "UnLocked";}
else if(HouseInfo[Houseidx][hDoors] == 1){Locked = "Locked";}
format(All, sizeof(All), "ID: %d | Owner: %s | Address: %s %d | Level: %d | Price: $%d | Doors: %s | Interior: %d",
Houseidx, HouseInfo[Houseidx][hOwner], HouseInfo[Houseidx][hAddress], Houseidx, HouseInfo[Houseidx][hLevel], HouseInfo[Houseidx][hPrice], Locked, HouseInfo[Houseidx][hInterior]);
format(All1, sizeof(All1), "Weapon: %d | Ammo: %d | Weapon1: %d | Ammo1: %d | Weapon2: %d | Ammo2: %d | Weapon3: %d | Ammo3: %d",
HouseInfo[Houseidx][hWeapon][0], HouseInfo[Houseidx][hAmmo][0], HouseInfo[Houseidx][hWeapon][1], HouseInfo[Houseidx][hAmmo][1], HouseInfo[Houseidx][hWeapon][2], HouseInfo[Houseidx][hAmmo][2], HouseInfo[Houseidx][hWeapon][3], HouseInfo[Houseidx][hAmmo][3]);
format(All2, sizeof(All2), "Weapon4: %d | Ammo4: %d | Money: $%d | Materials: %d | Weed: %d | Cocaine: %d | Dressing Room: %d",
HouseInfo[Houseidx][hWeapon][5], HouseInfo[Houseidx][hAmmo][5], HouseInfo[Houseidx][hMoney], HouseInfo[Houseidx][hMaterials], HouseInfo[Houseidx][hWeed], HouseInfo[Houseidx][hCocaine], HouseInfo[Houseidx][hDressingRoom]);
format(string, sizeof(string), "%s\n%s\n%s", All, All1, All2);
ShowDialog(playerid, Show:DialogID25, DIALOG_STYLE_MSGBOX, "{9E9211}House Info", string, "OK", "Back");
Код HTML:
error 032: array index out of bounds (variable "HouseInfo")
PHP код:
format(All2, sizeof(All2), "Weapon4: %d | Ammo4: %d | Money: $%d | Materials: %d | Weed: %d | Cocaine: %d | Dressing Room: %d",
HouseInfo[Houseidx][hWeapon][5], HouseInfo[Houseidx][hAmmo][5], HouseInfo[Houseidx][hMoney], HouseInfo[Houseidx][hMaterials], HouseInfo[Houseidx][hWeed], HouseInfo[Houseidx][hCocaine], HouseInfo[Houseidx][hDressingRoom]);