(dFile) error 047: array sizes do not match, or destination array is too small -
Jack_Leslie - 01.09.2011
So I'm trying to read a string with dFile but it's giving me the 047 error.
Here's my dFile code:
pawn Код:
PlayerInfo[playerid][pBanReason] = dfile_ReadString("BanReason");
And in my enum for playerinfo, I've got:
Not sure why it's giving me this error. (I'm not gonna listen to anyone who tells to me to use a different file system, I'm trying to learn dFile at the moment since y_ini annoyed me)
Re: (dFile) error 047: array sizes do not match, or destination array is too small -
=WoR=Varth - 01.09.2011
What is 047 error?
Re: (dFile) error 047: array sizes do not match, or destination array is too small -
Jack_Leslie - 01.09.2011
error 047: array sizes do not match, or destination array is too small
Re: (dFile) error 047: array sizes do not match, or destination array is too small -
=WoR=Varth - 01.09.2011
pawn Код:
format(PlayerInfo[playerid][pBanReason],sizeof(PlayerInfo[playerid][pBanReason]),"%s",dfile_ReadString("BanReason"));
Re: (dFile) error 047: array sizes do not match, or destination array is too small -
Jack_Leslie - 01.09.2011
Quote:
Originally Posted by varthshenon
pawn Код:
format(PlayerInfo[playerid][pBanReason],sizeof(PlayerInfo[playerid][pBanReason]),"%s",dfile_ReadString("BanReason"));
|
Код:
error 001: expected token: "]", but found "-identifier-"
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Re: (dFile) error 047: array sizes do not match, or destination array is too small -
=WoR=Varth - 01.09.2011
pawn Код:
format(PlayerInfo[playerid][pBanReason],126,"%s",dfile_ReadString("BanReason"));
Re: (dFile) error 047: array sizes do not match, or destination array is too small -
Jack_Leslie - 01.09.2011
Okay that works thanks, but I'm a bit confused.
Would that set the enum from the info in the file, or set the file to the info from the enum?
Re: (dFile) error 047: array sizes do not match, or destination array is too small -
=WoR=Varth - 01.09.2011
Set the enum from the string in the file.
Re: (dFile) error 047: array sizes do not match, or destination array is too small -
Jack_Leslie - 01.09.2011
Wait, got it
thankyou