Error help. - 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: Error help. (
/showthread.php?tid=279038)
Error help. -
iGetty - 25.08.2011
Error;
(12615) : error 047: array sizes do not match, or destination array is too small.
Line;
pawn Code:
Player[playerid][Appearance] = appearance;
Rest of command;
pawn Code:
command(appearance, playerid, params[])
{
new appearance[128];
if(sscanf(params, "s[128]", appearance)) return SendClientMessage(playerid, GREY, "Server: /appearance [description]");
else
{
new string[128];
SendClientMessage(playerid, GREY, "You have set your appearance to:");
format(string, sizeof(string), "%s", appearance);
SendClientMessage(playerid, WHITE, string);
Player[playerid][Appearance] = appearance;
}
return 1;
}
Please help me.
Re: Error help. -
Kar - 25.08.2011
what is the size of Player[playerid][Appearance]? make it 128 and you can set strings like that
or
pawn Code:
format(Player[playerid][Appearance], 128, "%s", appearance);
Re: Error help. -
=WoR=Varth - 25.08.2011
pawn Code:
format(Player[playerid][Appearance],sizeof(Player[playerid][Appearance]),"%s",appearance);
Re: Error help. -
Horrible - 25.08.2011
Player[playerid][Appearance] = appearance;
[Appearance] is for what?(what dou want to set?))
Re: Error help. -
iGetty - 25.08.2011
Thrown you both some REP, thank you so much!