03.02.2014, 17:32
Quote:
Again,
You need to use a for loop(Tutorial), NOT new. EDIT: And when I mean not a new, I mean not as a starter. You need to use the full for syntax. pawn Код:
|
Quote:
Almost got that for loop there! Just one tiny problem:
pawn Код:
Also, idx++ and ++idx are the same thing |
It's still erroring
(24433) : error 021: symbol already defined: "idx"
(24433) : error 001: expected token: ">", but found ";"
(24439) : error 047: array sizes do not match, or destination array is too small
(24449) : error 047: array sizes do not match, or destination array is too small
(24485) : error 035: argument type mismatch (argument 2)
(24486) : error 017: undefined symbol "MAX_HOUSES"
(24433) : warning 204: symbol is assigned a value that is never used: "idx"
pawn Код:
for(new idx = 0,idx <MAX_HOUSES; ++idx)
{
// Getting House Setup
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
//Making House
HouseInfo[idx][hName]= "Property For Sale!";
HouseInfo[idx][hLock] = 1;
HouseInfo[idx][hHours] = 10;
HouseInfo[idx][hPrice] = 15000;
HouseInfo[idx][hEnterX] = X;
HouseInfo[idx][hEnterY] = Y;
HouseInfo[idx][hEnterZ] = Z;
HouseInfo[idx][hExitX] = 2496.098876;
HouseInfo[idx][hExitY] = -1692.503051;
HouseInfo[idx][hExitZ] = 1014.742187;
HouseInfo[idx][hOwner] = "The State";
HouseInfo[idx][hOwned] = 0;
HouseInfo[idx][hRentable] = 0;
HouseInfo[idx][hRent] = 1;
HouseInfo[idx][hInterior] = 2;
HouseInfo[idx][hMoney] = 0;
HouseInfo[idx][hGun][0] = 0;
HouseInfo[idx][hGunAmmo][0] = 0;
HouseInfo[idx][hWeed] = 0;
HouseInfo[idx][hCocaine] = 0;
HouseInfo[idx][hCrack] = 0;
HouseInfo[idx][hArmour] = 0;
HouseInfo[idx][hType] = 0;
HouseInfo[idx][hEInt] = 0;
HouseInfo[idx][hEWorld] = 0;
HouseInfo[idx][hTime] = 0;
HouseInfo[idx][hGun][1] = 0;
HouseInfo[idx][hGunAmmo][1] = 0;
HouseInfo[idx][hGun][2] = 0;
HouseInfo[idx][hGunAmmo][2] = 0;
HouseInfo[idx][hGun][3] = 0;
HouseInfo[idx][hGunAmmo][3] = 0;
HouseInfo[idx][hComd] = 0;
HouseInfo[idx][hGun][4] = 0;
HouseInfo[idx][hGunAmmo][4] = 0;
HouseInfo[idx][hGun][5] = 0;
HouseInfo[idx][hGunAmmo][5] = 0;
HouseInfo[idx][hGun][6] = 0;
HouseInfo[idx][hGunAmmo][6] = 0;
HouseInfo[idx][hGun][7] = 0;
HouseInfo[idx][hGunAmmo][7] = 0;
HouseInfo[idx][hGun][8] = 0;
HouseInfo[idx][hGunAmmo][8] = 0;
HouseInfo[idx][hGun][9] = 0;
HouseInfo[idx][hGunAmmo][9] = 0;
format(string, sizeof(string), "{FF0000}[Admin Warn]:{FF6347} %s has created house ID %d.", sendername, idx);
SendAdminMessage(COLOR_LIGHTRED, 1, string);
idx = MAX_HOUSES;
}
return 1;
}