Array sizes do not match, or destination array is too small
#1

So there are my codes :
Код:
enum DPInfo
{
	Pickup,
	Text3D:PText,
	PickupText[256],
	Float:Pickupx,
	Float:Pickupy,
	Float:Pickupz,
	ActivePickup,
	PickupID
}
Код:
public LoadPickup(pickupid, name[], value[])
{
	INI_Int("Pickup",PickupInfo[pickupid][Pickup]);
   =>  	INI_String("Text", PickupInfo[pickupid][PickupText],256); <= THAT LINE
	INI_Float("Pickupx",PickupInfo[pickupid][Pickupx]);
	INI_Float("Pickupy",PickupInfo[pickupid][Pickupy]);
	INI_Float("Pickupz",PickupInfo[pickupid][Pickupz]);
	INI_Int("ActivePickup",PickupInfo[pickupid][ActivePickup]);
	INI_Int("PickupID", PickupInfo[pickupid][PickupID]);
	CreateDynamicPickup(PickupInfo[pickupid][Pickup],23,PickupInfo[pickupid][Pickupx],PickupInfo[pickupid][Pickupy],PickupInfo[pickupid][Pickupz], -1,-1,-1,20.0);
	PickupInfo[pickupid][PText] = CreateDynamic3DTextLabel(PickupInfo[pickupid][PickupText], COLOR_GREEN,PickupInfo[pickupid][Pickupx],PickupInfo[pickupid][Pickupy],PickupInfo[pickupid][Pickupz], 10.0,INVALID_PLAYER_ID, INVALID_VEHICLE_ID,-1,-1,-1,-1);
	return 1;
}
Код:
	Array sizes do not match, or destination array is too small
Reply
#2

Maybe INI_String doesn't supports few dimensional arrays

use
pawn Код:
new string[256];
INI_String("Text",string,256); <= THAT LINE
then
pawn Код:
PickupInfo[pickupid][PickupText] = string;
or
pawn Код:
PickupInfo[pickupid][PickupText][0] = EOS;
strcat(PickupInfo[pickupid][PickupText], string, 256);
Reply
#3

Quote:
Originally Posted by Jefff
Посмотреть сообщение
Maybe INI_String doesn't supports few dimensional arrays

use
pawn Код:
new string[256];
INI_String("Text",string,256); <= THAT LINE
then
pawn Код:
PickupInfo[pickupid][PickupText] = string;
Код:
error 035: argument type mismatch (argument 2)
Код:
INI_String("Text",string,256);
Reply
#4

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)