Error 047: Array sizes do not match, r destination array is too small
#1

Код:
stock InitBusinesses()
{
    new FileName[128];
    for(new i = 0; i < MAX_BUSINESSES; i++)
    {
        format(FileName, sizeof(FileName), "Businesses/Business_%d.ini", i);
        if(fexist(FileName))
        {
            BizzInfo[i][bEntranceX] = dini_Float(FileName, "EntranceX");
            BizzInfo[i][bEntranceY] = dini_Float(FileName, "EntranceY");
            BizzInfo[i][bEntranceZ] = dini_Float(FileName, "EntranceZ");

            BizzInfo[i][bExitX] = dini_Float(FileName, "ExitX");
            BizzInfo[i][bExitY] = dini_Float(FileName, "ExitY");
            BizzInfo[i][bExitZ] = dini_Float(FileName, "ExitZ");
            BizzInfo[i][bInterior] = dini_Int(FileName, "Interior");

            BizzInfo[i][bOwner] = dini_Get(FileName, "Owner"); //ERROR.
            BizzInfo[i][bLocked] = dini_Int(FileName, "Locked");
            BizzInfo[i][bBuyPrice] = dini_Int(FileName, "BuyPrice");
            BizzInfo[i][bTill] = dini_Int(FileName, "Till");
            BizzInfo[i][bProducts] = dini_Int(FileName, "Products");
            BizzInfo[i][bEntranceCost] = dini_Int(FileName, "EntranceCost");
            BizzInfo[i][bOwned] = dini_Int(FileName, "Owned");
            
            BizzInfo[i][bMessage] = dini_Get(FileName, "Message"); //ERROR.
            
            BizzInfo[i][bTagLabel] = dini_Int(FileName, "TagLabel");
            BizzInfo[i][bTextLabelOwner] = dini_Int(FileName, "TextLabelOwner");

           	BizzInfo[i][bPickupID] = CreatePickup(1272, 23, BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]);
			new string[255];
            printf("[system] Business %d spawned.", i);
            format(string, sizeof(string),"%s", BizzInfo[i][bTagLabel]);
            Create3DTextLabel(string,COLOR_WHITE,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]+0.88,20.0,0,1);
            strmid(BizzInfo[i][bTagLabel], string, 0, strlen(string), 255);
            //owner
            format(string, sizeof(string),"Owner: %s", BizzInfo[i][bOwner]);
            Create3DTextLabel(string,COLOR_WHITE,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]+0.74,20.0,0,1);
            strmid(BizzInfo[i][bTextLabelOwner], string, 0, strlen(string), 255);
            format(string, sizeof(string),"Business ID: %d", i);
            Create3DTextLabel(string,COLOR_YELLOW,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]+0.60,20.0,0,1);
            format(string, sizeof(string),"Entrance Fee: $%s", BizzInfo[i][bEntranceCost]);
            Create3DTextLabel(string,COLOR_WHITE,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]+0.50,20.0,0,1);
            SpawnedBusinesses++;
       }
    }
	return 1;
}
These are the errors i get:

Код:
error 047: array sizes do not match, or destination array is too small
, it's the same one for both of the lines,

The error lines:
Код:
BizzInfo[i][bMessage] = dini_Get(FileName, "Message");
Код:
BizzInfo[i][bOwner] = dini_Get(FileName, "Owner");
Help please
Reply


Messages In This Thread
Error 047: Array sizes do not match, r destination array is too small - by NewYorkRP - 28.11.2010, 16:49
Re: Error 047: Array sizes do not match, r destination array is too small - by NewYorkRP - 28.11.2010, 17:36
Re: Error 047: Array sizes do not match, r destination array is too small - by WillyP - 28.11.2010, 17:39
Re: Error 047: Array sizes do not match, r destination array is too small - by NewYorkRP - 28.11.2010, 17:47

Forum Jump:


Users browsing this thread: 1 Guest(s)