warning 202: number of arguments does not match definition -
Izaki - 14.07.2016
PHP код:
forward CheckAkun(playerid); // yang baru // LoginDialog // RegisterDialog
public CheckAkun(playerid)
{
new
rows,
fields;
cache_get_data(rows, fields, mysql);
new string[256];
if(rows)
{
cache_get_field_content(0, "Password", pInfo[playerid][Password], mysql, 129);
pInfo[playerid][ID] = cache_get_field_content_int(0, "ID");
ShowPlayerDialog(playerid, LoginDialog, DIALOG_STYLE_PASSWORD,string,"Login", "Welcome player!\nYour account has been found in our database. Please fill in your password:", "Login", "Quit");
}
else
{
ShowPlayerDialog(playerid, RegisterDialog, DIALOG_STYLE_PASSWORD,string,"Register", "Welcome player!\nYour account has not been registered yet. Please fill in your desired password:", "Register", "Quit");
}
return 1;
}
Re: warning 202: number of arguments does not match definition -
Stinged - 14.07.2016
Код:
ShowPlayerDialog(playerid, LoginDialog, DIALOG_STYLE_PASSWORD,string,"Login", "Welcome player!\nYour account has been found in our database. Please fill in your password:", "Login", "Quit");
(Also in the second dialog)
What's that for?
Re: warning 202: number of arguments does not match definition -
Izaki - 14.07.2016
solved bro , i forgot for use what
PHP код:
forward CheckAkun(playerid);
public CheckAkun(playerid)
{
new
rows,
fields;
cache_get_data(rows, fields, mysql);
new string[256];
if(rows)
{
pInfo[playerid][ID] = cache_get_field_content_int(0, "ID");
cache_get_field_content(0, "Password", pInfo[playerid][Password], mysql, 129);
format(string,sizeof(string)," Login - %s", PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,string," system have detected your username registered please login","Login","Exit");
}
else
{
format(string,sizeof(string)," Register - %s", PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,string," Welcome to "NAME"\ninput password and click register!","Register","Exit");
}
return 1;
}
SOLVED
Re: warning 202: number of arguments does not match definition -
Stinged - 14.07.2016
Friendly advice: Don't use 256 for a string that small.
Login - %s
%s is replaced with the player's name, which has a max length of 24 characters.
So string should be the length of "Login - " plus 24.
8 + 24 = 32 characters.
string should have a size of 33 characters.
Re: warning 202: number of arguments does not match definition -
Izaki - 14.07.2016
Thanks for suggetion