Dialog - 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: Dialog (
/showthread.php?tid=650771)
Dialog -
Thanks - 06.03.2018
Hi I've creating a dialog for
%s but it's not work
Код:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{D55064}Account Authentication","{ffffff}Zeno's {007CFF}Cops {FFFFFF}And {FF0000}Robbers\n\n{27FF00}Account %s.\n\n{FFFFFF}Please enter a password below:","Login", "Quit",rname);
I've just placed a %s for show player name but they given me a warring
Код:
warning 202: number of arguments does not match definition
Re: Dialog -
NaS - 06.03.2018
ShowPlayerDialog does not support formatting.
You need to declare an Array to store the string in, format it using format() and then pass the array to the function:
Код:
new text[150]; // The text is about 120 characters long, adding the name (24 characters max) will sum up to 144 characters, so the array must be at least that big
format(text, sizeof(text), "{ffffff}Zeno's {007CFF}Cops {FFFFFF}And {FF0000}Robbers\n\n{27FF00}Account %s.\n\n{FFFFFF}Please enter a password below:", rname); // format the text array
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{D55064}Account Authentication", text, "Login", "Quit");
Re: Dialog -
Thanks - 06.03.2018
Thank you worked!