SetPlayerSkin error - 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: SetPlayerSkin error (
/showthread.php?tid=440453)
SetPlayerSkin error -
Mattakil - 29.05.2013
On the line of SetPlayerSkin, I get an error: Argument type mismatch.
I am using a dialog to set the player's skin when they first register on the server, the skin is set via dialog.
The issue is simple to fix, but for some reason I just cant remember :S
pawn Код:
if(dialogid == DIALOG_SKIN)
{
if(response)
{ new skin[3];
format(skin, sizeof(skin), inputtext);
SetPlayerSkin(playerid, skin);
return 1;
}
}
And please no comments such as "Had you searched" because I did search and could not find anything
Re: SetPlayerSkin error -
GiamPy. - 29.05.2013
You may only use integer values in the second parameter of SetPlayerSkin.
Change this:
pawn Код:
new skin[3];
format(skin, sizeof(skin), inputtext);
SetPlayerSkin(playerid, skin);
Into:
pawn Код:
SetPlayerSkin(playerid, strval(inputtext));
Re: SetPlayerSkin error -
Mattakil - 29.05.2013
Right...Ive been refraining from dialogs and working with sscanf, thanks