Error help.
#1

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.
Reply
#2

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);
Reply
#3

pawn Code:
format(Player[playerid][Appearance],sizeof(Player[playerid][Appearance]),"%s",appearance);
Reply
#4

Player[playerid][Appearance] = appearance;
[Appearance] is for what?(what dou want to set?))
Reply
#5

Thrown you both some REP, thank you so much!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)