[HELP] argument type mismatch
#1

As the title says.

pawn Код:
if(strcmp(cmd, "/clothes", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_DARKGREY, " You're not logged in yet.");
                return 1;
            }
            if(PlayerToPoint(6.0, playerid, 2104.1123,2257.2759,11.0234))
            {
                ShowPlayerDialog(playerid, 6, DIALOG_STYLE_INPUT, "Binco", "Type the ID of the skin you want below.", "Change", "Close" );
            }
            else
            {
                SendClientMessage(playerid, COLOR_DARKGREY, " You're not at a clothing store or at the faction spawn.");
            }
        }
        return 1;
    }
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case 6:
        {
            if(!response)
            {
                return 1;
            }
            if(!strlen(inputtext))
            {
                ShowPlayerDialog(playerid, 6, DIALOG_STYLE_INPUT, "Binco", "Type the ID of the skin you want below.", "Change", "Close" );
            }
            else
            {
                SetPlayerSkin(playerid, inputtext); // argument type mismatch (argument 2)
            }
        }
    }
    return 0;
}
Reply
#2

Line?
Reply
#3

skin id is an integer, and inputtext is a string. use strval -> https://sampwiki.blast.hk/wiki/Strval
pawn Код:
SetPlayerSkin(playerid, strval(inputtext));
edit: can't test this atm.
Reply
#4

Quote:
Originally Posted by Dwane
Посмотреть сообщение
Line?
Check the 2nd pawn box, I've marked it with "//"...
Reply
#5

Change:

pawn Код:
SetPlayerSkin(playerid, inputtext);
to:
pawn Код:
SetPlayerSkin(playerid, strval(inputtext));
Reply
#6

Quote:
Originally Posted by [Diablo]
Посмотреть сообщение
skin id is an integer, and inputtext is a string. use strval -> https://sampwiki.blast.hk/wiki/Strval
pawn Код:
SetPlayerSkin(playerid, strval(inputtext));
edit: can't test this atm.
That did it, thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)