07.02.2014, 05:52
Hello, i've been added business system from this thread in my GM http://forum.sa-mp.com/showthread.ph...light=business
i found 2 errors..
this is my code :
how to fix it?
the MAX_PLAYER_NAME string is 24 as the Tutorial do..
thank you..
PS: sorry for my bad english.
i found 2 errors..
Код:
: error 047: array sizes do not match, or destination array is too small : error 047: array sizes do not match, or destination array is too small
pawn Код:
//enums
enum bInfo
{
bOwned,
bPrice,
bOwner[MAX_PLAYER_NAME],
bType,
bLocked,
bMoney,
Float:bEntranceX,
Float:bEntranceY,
Float:bEntranceZ,
Float:bEntranceA,
Float:bExitX,
Float:bExitY,
Float:bExitZ,
Float:bExitA,
bInt,
bWorld,
bInsideInt,
bInsideWorld,
bInsideIcon,
bOutsideIcon,
bName[128]
}
new BusinessInfo[200][bInfo];
//loading
forward loadbiz_data(idx, name[], value[]);
public loadbiz_data(idx, name[], value[])
{
INI_Int("bOwned", BusinessInfo[idx][bOwned]);
INI_Int("bPrice", BusinessInfo[idx][bPrice]);
INI_String("bOwner", BusinessInfo[idx][bOwner], 24); // this is error 1
INI_Int("bType", BusinessInfo[idx][bType]);
INI_Int("bLocked", BusinessInfo[idx][bLocked]);
INI_Int("bMoney", BusinessInfo[idx][bMoney]);
INI_Float("bEntranceX", BusinessInfo[idx][bEntranceX]);
INI_Float("bEntranceY", BusinessInfo[idx][bEntranceY]);
INI_Float("bEntranceZ", BusinessInfo[idx][bEntranceZ]);
INI_Float("bEntranceA", BusinessInfo[idx][bEntranceA]);
INI_Float("bExitX", BusinessInfo[idx][bExitX]);
INI_Float("bExitY", BusinessInfo[idx][bExitY]);
INI_Float("bExitZ", BusinessInfo[idx][bExitZ]);
INI_Float("bExitA", BusinessInfo[idx][bExitA]);
INI_Int("bInt", BusinessInfo[idx][bInt]);
INI_Int("bWorld", BusinessInfo[idx][bWorld]);
INI_Int("bInsideInt", BusinessInfo[idx][bInsideInt]);
INI_Int("bInsideWorld", BusinessInfo[idx][bInsideWorld]);
INI_String("bName", BusinessInfo[idx][bName], 128); // this is error 2
return 1;
}
the MAX_PLAYER_NAME string is 24 as the Tutorial do..
thank you..
PS: sorry for my bad english.