.pwn(228) : error 047: array sizes do not match, or destination array is too small
#1

I got this error
Код:
.pwn(228) : error 047: array sizes do not match, or destination array is too small
On the top
Код:
#define MAX_STRING 128

enum pInfo
{
        xxxxxx,
	GangName[MAX_STRING],
	xxxxxxx,
	xxxxxx[MAX_STRING]
}
and here the 228 line
Код:
PGangInfo[playerid][GangName] = dini_Get(PFile(playerid), "GangName");
any help?
Reply
#2

From what I heard, I think dini uses 256 strings. I recommend using Y_INI if you're using file systems. If you don't want to change to Y_INI, change MAX_STRING to 256.
Reply
#3

I just too lazy for converting them all to Y_INI. Theres no effect change the MAX_STRING as you said
Reply
#4

Use format ...
Reply
#5

example?
Reply
#6

What are you using that bit of code for? Really need to see the whole code to understand. Are you registering, saving, loading a player or what?
Reply
#7

pawn Код:
format( PGangInfo[playerid][GangName], MAX_STRING, "%s", dini_Get( PFile( playerid ), "GangName" ) );
Replace that line with the code I've provided.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)