SA-MP Forums Archive
error 035: argument type mismatch (argument 3) - 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 035: argument type mismatch (argument 3) (/showthread.php?tid=462773)



error 035: argument type mismatch (argument 3) - Jason_Roul - 08.09.2013

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/jdm", cmdtext, true, 10) == 0)
	{
		ShowPlayerDialog(playerid, 6969, "Jefferson Motel DM", DIALOG_STYLE_LIST, "Police\nRobbers", "Choose", "");
		return 1;
	}
	return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 6969)
	{
		if(response)
		{
			if(listitem == 0)
			{
               SetPlayerPos(playerid, 2216.3401,-1150.5100,1025.7969);
               GivePlayerWeapon(playerid, 24, 500);
               GivePlayerWeapon(playerid, 31, 2500);
	           GivePlayerWeapon(playerid, 9, 1);
               SetPlayerArmour(playerid, 100);
               SetPlayerHealth(playerid, 100);
               SetPlayerSkin(playerid, 285);
			}
			if(listitem == 1)
			{
               SetPlayerPos(playerid, 2216.3401,-1150.5100,1025.7969);
               GivePlayerWeapon(playerid, 24, 500);
		       GivePlayerWeapon(playerid, 31, 2500);
			   GivePlayerWeapon(playerid, 9, 1);
			   SetPlayerArmour(playerid, 100);
			   SetPlayerHealth(playerid, 100);
			   SetPlayerSkin(playerid, 8);
			}
        }
        return 1; 
    }

    return 0;
}
Anybody knows whats wrong?


Re: error 035: argument type mismatch (argument 3) - doreto - 08.09.2013

Witch line ?


Re: error 035: argument type mismatch (argument 3) - Dragonsaurus - 08.09.2013

pawn Код:
ShowPlayerDialog(playerid, 6969, DIALOG_STYLE_LIST, "Jefferson Motel DM", "Police\nRobbers", "Choose", "");



Re: error 035: argument type mismatch (argument 3) - Konstantinos - 08.09.2013

Change:
pawn Код:
ShowPlayerDialog(playerid, 6969, "Jefferson Motel DM", DIALOG_STYLE_LIST, "Police\nRobbers", "Choose", "");
To:
pawn Код:
ShowPlayerDialog(playerid, 6969, DIALOG_STYLE_LIST, "Jefferson Motel DM", "Police\nRobbers", "Choose", "");
// ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
And:
pawn Код:
if (strcmp("/jdm", cmdtext, true, 10) == 0)
To:
pawn Код:
if (strcmp("/jdm", cmdtext, true) == 0)
"/jdm" has 4 lenght, not 10. It's optional, so do not use it.

EDIT: lol


Re: error 035: argument type mismatch (argument 3) - Jason_Roul - 08.09.2013

That worked for some reason, thanks alot Konstantinos.

S'agapaw <3 (If you're greek)