.pwn(228) : error 047: array sizes do not match, or destination array is too small - 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: .pwn(228) : error 047: array sizes do not match, or destination array is too small (
/showthread.php?tid=335612)
.pwn(228) : error 047: array sizes do not match, or destination array is too small -
Leingod. - 19.04.2012
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?
Re: .pwn(228) : error 047: array sizes do not match, or destination array is too small -
SuperViper - 19.04.2012
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.
Re: .pwn(228) : error 047: array sizes do not match, or destination array is too small -
Leingod. - 19.04.2012
I just too lazy for converting them all to Y_INI. Theres no effect change the MAX_STRING as you said
Re: .pwn(228) : error 047: array sizes do not match, or destination array is too small -
ViniBorn - 19.04.2012
Use format ...
Re: .pwn(228) : error 047: array sizes do not match, or destination array is too small -
Leingod. - 19.04.2012
example?
Re: .pwn(228) : error 047: array sizes do not match, or destination array is too small -
Jack_Leslie - 19.04.2012
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?
Re: .pwn(228) : error 047: array sizes do not match, or destination array is too small -
Lorenc_ - 19.04.2012
pawn Код:
format( PGangInfo[playerid][GangName], MAX_STRING, "%s", dini_Get( PFile( playerid ), "GangName" ) );
Replace that line with the code I've provided.