09.12.2013, 09:08
Не помню что вчера нашаманил вышло так вот...
Когда [MAX_PLAYER_NAME] добовляю к fRab или fZam (fZam[3][MAX_PLAYER_NAME])
Появляется ошибка error 001: expected token: "}", but found "["
pawn Код:
enum ferms
{
Float: fPosx,
Float: fPosy,
Float: fPosz,
Float: fPminx,
Float: fPminy,
Float: fPmaxx,
Float: fPmaxy,
fRab[5],
fZam[3],
fOwner[MAX_PLAYER_NAME],
fPatner[MAX_PLAYER_NAME],
fBalance,
fLandTax,
fZaRabot,
fCenaZerna,
fZernaZak,
fZernaZas,
fProdSell,
fProdSklad,
fProdFee,
fPick,
fWalton[2],
fComb
};
new Ferm[MAX_FERM][ferms];
pawn Код:
for(new f = 1; f <= MAX_FERM; f++)
{
mysql_format(connectionHandl,query,128,"SELECT * FROM `Ferm` WHERE `Id` = '%d'", f);
mysql_function_query(connectionHandl, query, true, "LoadFerm","d", f);
}
pawn Код:
public LoadFerm(f)
{
new rows, fields;
cache_get_data(rows, fields);
if(rows)
{
cache_get_field_content(0, "Owner", Ferm[f][fOwner], 1, 64);
cache_get_field_content(0, "Partner", Ferm[f][fPatner], 1, 64);
cache_get_field_content(0, "Rab1", Ferm[f][fRab][0], 1, MAX_PLAYER_NAME);
cache_get_field_content(0, "Rab2", Ferm[f][fRab][1], 1, MAX_PLAYER_NAME);
cache_get_field_content(0, "Rab3", Ferm[f][fRab][2], 1, MAX_PLAYER_NAME);
cache_get_field_content(0, "Rab4", Ferm[f][fRab][3], 1, MAX_PLAYER_NAME);
cache_get_field_content(0, "Rab5", Ferm[f][fRab][4], 1, MAX_PLAYER_NAME);
cache_get_field_content(0, "Zam1", Ferm[f][fZam][0], 1, 64);
cache_get_field_content(0, "Zam2", Ferm[f][fZam][1], 1, 64);
cache_get_field_content(0, "Zam3", Ferm[f][fZam][2], 1, 64);
Ferm[f][fPosx] = cache_get_field_content_float(0, "Posx");
Ferm[f][fPosy] = cache_get_field_content_float(0, "Posy");
Ferm[f][fPosz] = cache_get_field_content_float(0, "Posz");
Ferm[f][fPminx] = cache_get_field_content_float(0, "Pminx");
Ferm[f][fPminy] = cache_get_field_content_float(0, "Pminy");
Ferm[f][fPmaxx] = cache_get_field_content_float(0, "Pmaxx");
Ferm[f][fPmaxy] = cache_get_field_content_float(0, "Pmaxy");
Ferm[f][fBalance] = cache_get_field_content_int(0,"Balance");
Ferm[f][fLandTax] = cache_get_field_content_int(0,"LandTax");
Ferm[f][fZaRabot] = cache_get_field_content_int(0,"ZaRabot");
Ferm[f][fCenaZerna] = cache_get_field_content_int(0,"CenaZerna");
Ferm[f][fZernaZak] = cache_get_field_content_int(0,"ZernaZak");
Ferm[f][fZernaZas] = cache_get_field_content_int(0,"ZernaZas");
Ferm[f][fProdSell] = cache_get_field_content_int(0,"ProdSell");
Ferm[f][fProdSklad] = cache_get_field_content_int(0,"ProdSklad");
Ferm[f][fProdFee] = cache_get_field_content_int(0,"ProdFee");
Ferm[f][fPick] = CreatePickup(1275, 23, Ferm[f][fPosx], Ferm[f][fPosy], Ferm[f][fPosz]);
}
return 1;
}
Появляется ошибка error 001: expected token: "}", but found "["