SA-MP Forums Archive
Error 047 - 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: Error 047 (/showthread.php?tid=182346)



Error 047 - jameskmonger - 10.10.2010

Код:
stock OnPlayerLogin(playerid, password[])
{
		new file[128], filepassword[256], tmp[256], PlayerName[24];
		new name[MAX_PLAYER_NAME];
		tmp = password;
But I get this error:
Quote:

C:\Users\James\Desktop\SAMP\gamemodes\FORP.pwn(548 ) : error 047: array sizes do not match, or destination array is too small

And line 548 is "tmp = password;"


Re: Error 047 - [HiC]TheKiller - 10.10.2010

Why would you need that line in the first place? tmp and passwords are strings, not arrays so format tmp like this.

pawn Код:
format(tmp, sizeof(tmp), "%s", password);