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



argument type mismatch ShowPlayerDialog - SwisherSweet - 27.06.2013

Код:
ShowPlayerDialog(playerid,dialogid,DIALOG_STYLE_PASSWORD,"{B1D404} World War 3 [v1]-=- Register Account Information","Welcome %s(%d) To World War 3 -=- Team Death Match",PlayerName(playerid),playerid,"Register","Exit");
I don't get this it gives me and error Argument Type Mismatch or some shit, can someone tell me wheat i did wrong with it?


Re: argument type mismatch ShowPlayerDialog - Smokkr - 27.06.2013

Did you define "dialogid" on top of your script?


Re: argument type mismatch ShowPlayerDialog - SwisherSweet - 27.06.2013

yea it's not that it's this i just don't know where to put it, i know how to do it with sendclientmessage but never did it with showplayerdialog
Код:
%s(%d) To World War 3 -=- Team Death Match",PlayerName(playerid),playerid,"Register","Exit");



Re: argument type mismatch ShowPlayerDialog - Smokkr - 27.06.2013

Try this:
pawn Код:
ShowPlayerDialog(playerid,dialogid,DIALOG_STYLE_PASSWORD,"{B1D404} World War 3 [v1]-=- Register Account Information","Welcome %s(%d) To World War 3 -=- Team Death Match","Register","Exit",PlayerName(playerid),playerid);



Re: argument type mismatch ShowPlayerDialog - SilverKiller - 27.06.2013

Use format.

Example:

pawn Код:
new string[60];
format(string, 60, ".... %d", playerid);
ShowPlayerDialog(playerid, dialogid, dialog_style, "info", string, "yes", "no");



Respuesta: argument type mismatch ShowPlayerDialog - JustBored - 27.06.2013

pawn Код:
new str[75];
format(str, sizeof(str),"Welcome %s(%d) To World War 3 -=- Team Death Match",PlayerName(playerid),playerid);
ShowPlayerDialog(playerid,dialogid,DIALOG_STYLE_PASSWORD,"{B1D404} World War 3 [v1]-=- Register Account Information",str,"Register","Exit");
ShowPlayerDialog doesnt admit parameters.


Re: Respuesta: argument type mismatch ShowPlayerDialog - SilverKiller - 27.06.2013

Quote:
Originally Posted by JustBored
Посмотреть сообщение
pawn Код:
new str[75];
format(str, sizeof(str),"Welcome %s(%d) To World War 3 -=- Team Death Match",PlayerName(playerid),playerid);
ShowPlayerDialog(playerid,dialogid,DIALOG_STYLE_PASSWORD,"{B1D404} World War 3 [v1]-=- Register Account Information",str,"Register","Exit");
ShowPlayerDialog doesnt admit parameters.
Too late...


Re: argument type mismatch ShowPlayerDialog - Smokkr - 27.06.2013

This is a simple Dialog..It doesn't need format.


Respuesta: argument type mismatch ShowPlayerDialog - JustBored - 27.06.2013

LOl you won me for a few seconds xd.


Re: argument type mismatch ShowPlayerDialog - SilverKiller - 27.06.2013

It needs, he uses %s and %d and with this he shows his playerid and name and it needs format.