error 035: argument type mismatch (argument 3)
#1

Код:
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?
Reply
#2

Witch line ?
Reply
#3

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

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
Reply
#5

That worked for some reason, thanks alot Konstantinos.

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


Forum Jump:


Users browsing this thread: 1 Guest(s)