[HELP] House System Error. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] House System Error. (
/showthread.php?tid=559674)
[HELP] House System Error. -
HY - 24.01.2015
pawn Код:
Case.pwn(141) : error 047: array sizes do not match, or destination array is too small
pawn Код:
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;
}
pawn Код:
enum cInfo
{
cPret,
cInterior,
cOwned,
cLock,
cOwner[MAX_PLAYER_NAME],
cPick,
cWorld,
Text3D:cLabel,
Float:cX,
Float:cY,
Float:cZ
}
What's wrong here?

)-:
Re: [HELP] House System Error. -
zaibaslr2 - 24.01.2015
Please show your array "CasaInfo"
Re: [HELP] House System Error. -
HY - 24.01.2015
pawn Код:
new CasaInfo[MAX_CASE][cInfo];