PDA

View Full Version : [HELP] House System Error.


HY
24/01/2015, 05:35 PM
Case.pwn(141) : error 047: array sizes do not match, or destination array is too small


stock LoadCase()
{
new File[100];
for(new i = 0; i < MAX_CASE; i++)
{
format(File, sizeof(File), "Case/%d.ini", i);
if(fexist(File))
{
CasaInfo[i][cPret] = dini_Int(File, "Pret");
CasaInfo[i][cInterior] = dini_Int(File, "Interior");
CasaInfo[i][cLock] = dini_Int(File, "Incuiata");
CasaInfo[i][cOwner] = dini_Get(File, "Owner");
CasaInfo[i][cOwned] = dini_Int(File, "Cumparata");
CasaInfo[i][cWorld] = dini_Int(File, "World");
CasaInfo[i][cX] = dini_Float(File, "Pozitie X");
CasaInfo[i][cY] = dini_Float(File, "Pozitie Y");
CasaInfo[i][cZ] = dini_Float(File, "Pozitie Z");
if(CasaInfo[i][cOwned] == 0)
{
CasaInfo[i][cPick] = CreatePickup(1273, 1, CasaInfo[i][cX], CasaInfo[i][cY], CasaInfo[i][cZ], CasaInfo[i][cWorld]);
}
if(CasaInfo[i][cOwned] == 1)
{
CasaInfo[i][cPick] = CreatePickup(1272, 1, CasaInfo[i][cX], CasaInfo[i][cY], CasaInfo[i][cZ], CasaInfo[i][cWorld]);
}
casaid++;
}
}
}
return 1;
}

enum cInfo
{
cPret,
cInterior,
cOwned,
cLock,
cOwner[MAX_PLAYER_NAME],
cPick,
cWorld,
Text3D:cLabel,
Float:cX,
Float:cY,
Float:cZ
}

What's wrong here? :-()-:

zaibaslr2
24/01/2015, 05:40 PM
Please show your array "CasaInfo"

HY
24/01/2015, 05:45 PM
new CasaInfo[MAX_CASE][cInfo];

#define MAX_CASE 1000