03.07.2013, 15:26
I have made a garage system but on compilling it says "Undefined symbole "garageinfo"
But i already defined it
Codes:
Error Place:
All "GarageInfo" is undefined Why? I defined them, Hope you help me
But i already defined it
Codes:
pawn Код:
enum gInfo
{
gOwned,
gLevel,
gHInteriorWorld,
gCustomInterior,
gDescription[128],
gOwner[ MAX_PLAYER_NAME ],
Float: gExteriorX,
Float: gExteriorY,
Float: gExteriorZ,
Float: gExteriorR,
Float: gExteriorA,
Float: gInteriorX,
Float: gInteriorY,
Float: gInteriorZ,
Float: gInteriorR,
Float: gInteriorA,
gLock,
gRentable,
gRentFee,
gValue,
gSafeMoney,
gPot,
gCrack,
gMaterials,
gWeapons[ 5 ],
gGLUpgrade,
gPickupID,
Text3D: gTextID,
gCustomExterior,
};
new GarageInfo[MAX_GARAGES][gInfo];
pawn Код:
LoadGarages() {
if(!fexist("garages.cfg")) return 1;
new
szFileStr[1024],
File: iFileHandle = fopen("garages.cfg", io_read),
iIndex;
while(iIndex < sizeof(GarageInfo) && fread(iFileHandle, szFileStr)) {
sscanf(szFileStr, "p<|>iiis[128]s[24]ffffffffiiiiiiiiiiiiiiiiiff",
GarageInfo[iIndex][gOwned],
GarageInfo[iIndex][gLevel],
GarageInfo[iIndex][gHInteriorWorld],
GarageInfo[iIndex][gDescription],
GarageInfo[iIndex][gOwner],
GarageInfo[iIndex][gExteriorX],
GarageInfo[iIndex][gExteriorY],
GarageInfo[iIndex][gExteriorZ],
GarageInfo[iIndex][gExteriorR],
GarageInfo[iIndex][gInteriorX],
GarageInfo[iIndex][gInteriorY],
GarageInfo[iIndex][gInteriorZ],
GarageInfo[iIndex][gInteriorR],
GarageInfo[iIndex][gLock],
GarageInfo[iIndex][gRentable],
GarageInfo[iIndex][gRentFee],
GarageInfo[iIndex][gValue],
GarageInfo[iIndex][gSafeMoney],
GarageInfo[iIndex][gPot],
GarageInfo[iIndex][gCrack],
GarageInfo[iIndex][gMaterials],
GarageInfo[iIndex][gWeapons][0],
GarageInfo[iIndex][gWeapons][1],
GarageInfo[iIndex][gWeapons][2],
GarageInfo[iIndex][gWeapons][3],
GarageInfo[iIndex][gWeapons][4],
GarageInfo[iIndex][gGLUpgrade],
GarageInfo[iIndex][gPickupID],
GarageInfo[iIndex][gCustomInterior],
GarageInfo[iIndex][gCustomExterior],
GarageInfo[iIndex][gExteriorA],
GarageInfo[iIndex][gInteriorA]
);
if(GarageInfo[iIndex][gOwned]) {
if(GarageInfo[iIndex][gRentable] == 0) format(szFileStr, sizeof(szFileStr), "Garage Owned By\n%s\nID: %d",GarageInfo[iIndex][gOwner],iIndex);
else format(szFileStr, sizeof(szFileStr), "Garage Owned By\n%s\nID: %d",GarageInfo[iIndex][gOwner],iIndex);
}
else format(szFileStr, sizeof(szFileStr), "This Garage is\n for sale!\nCost: $%d\nID: %d\nTo buy this garage Type /buygarage",GarageInfo[iIndex][gValue],iIndex);
GarageInfo[iIndex][gPickupID] = CreateDynamicPickup(1318, 23, GarageInfo[iIndex][gExteriorX], GarageInfo[iIndex][gExteriorY], GarageInfo[iIndex][gExteriorZ]);
GarageInfo[iIndex][gTextID] = CreateDynamic3DTextLabel(szFileStr, COLOR_LIGHTBLUE, GarageInfo[iIndex][gExteriorX], GarageInfo[iIndex][gExteriorY], GarageInfo[iIndex][gExteriorZ]+0.5,30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 30.0);
++iIndex;
}
return fclose(iFileHandle);
}