dialog input 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: dialog input error (
/showthread.php?tid=623667)
dialog input error -
GabiXx - 03.12.2016
I use this
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
{
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, ""COL_WHITE"Registering...",""COL_RED"Ai introdus o parola gresita.\n"COL_WHITE"Scrie o parola pentru a te inregistra.","Register","Quit");
ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "Scrie-ti adresa de email.", "Alege", "Inchide");
if (!response) return Kick(playerid);
if(response)
{
new INI:File = INI_Open(UserPath(playerid));
GivePlayerMoney(playerid,10000);
SetPlayerScore(playerid, 1);
SetPlayerSkin(playerid, 170);
SetSpawnInfo(playerid,0,PlayerInfo[playerid][pSkin],1283.5896,-1329.5938,13.3824,89.6460,0,0,0,0,0,0);
SetPlayerColor(playerid, 0xFFFFFFAA);
SpawnPlayer(playerid);
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Level",0);
INI_WriteInt(File,"Skin",0);
INI_WriteInt(File,"Kills",0);
INI_Close(File);
}
}
}
And i get warning 202: number of arguments does not match definition on next line:
PHP код:
ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "Scrie-ti adresa de email.", "Alege", "Inchide");
Re: dialog input error - iLearner - 03.12.2016
PHP код:
ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "Scrie-ti adresa de email.", "Alege", "Inchide", " ");
Try that, you were missing a parameter, with this: you have Scrie-ti adresa de email. as tital, alege as text, inchide as button one, and nothing as button 2
Re: dialog input error -
GabiXx - 03.12.2016
It work, but i get spawn before getting the EMAIL dialog and everybutton i click, nothing is happend. And it's set to kick player if no response. Help?