SA-MP Forums Archive
Loading a string from a file? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Loading a string from a file? (/showthread.php?tid=65698)



Loading a string from a file? - kevin433 - 15.02.2009

Hi,
I want to load a string from a file. I tried it a few times, but i always get this error:

Код:
C:\Users\*****\Desktop\samp02Xserver.win32\gamemodes\*****.pwn(18523) : error 047: array sizes do not match, or destination array is too small
The line is this:

Код:
PlayerInfo[playerid][pEmail] = dini_Get(connect, "Email");
I tried it like this too:

Код:
format(PlayerInfo[playerid][pEmail], 59, dini_Get(connect, "Email"));



Re: Loading a string from a file? - Donny_k - 15.02.2009

Your 'pEmail' string is smaller than the 'dini_Get' string (the one it returns).




Re: Loading a string from a file? - kevin433 - 15.02.2009

I tried to make the pEmail to 256 and tried PlayerInfo[playerid][pEmail] = dini_Get(connect, "Email"); , but i get the same error. Should i try format(PlayerInfo[playerid][pEmail], 59, dini_Get(connect, "Email"));?