warning 202: number of arguments does not match definition
#1

PHP код:
forward CheckAkun(playerid); // yang baru  // LoginDialog  // RegisterDialog
public CheckAkun(playerid)
{
    new
        
rows,
        
fields;
    
cache_get_data(rowsfieldsmysql);
    new 
string[256];
    if(
rows)
    {
        
cache_get_field_content(0"Password"pInfo[playerid][Password], mysql129);
        
pInfo[playerid][ID] = cache_get_field_content_int(0"ID");
        
ShowPlayerDialog(playerid,  LoginDialogDIALOG_STYLE_PASSWORD,string,"Login""Welcome player!\nYour account has been found in our database. Please fill in your password:""Login""Quit");
    }
    else
    {
        
ShowPlayerDialog(playeridRegisterDialogDIALOG_STYLE_PASSWORD,string,"Register""Welcome player!\nYour account has not been registered yet. Please fill in your desired password:""Register""Quit");
    }
    return 
1;

Reply
#2

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

solved bro , i forgot for use what

PHP код:
forward CheckAkun(playerid);
public 
CheckAkun(playerid)
{
    new
        
rows,
        
fields;
    
cache_get_data(rowsfieldsmysql);
    new 
string[256];

    if(
rows)
    {
        
pInfo[playerid][ID] = cache_get_field_content_int(0"ID");
        
cache_get_field_content(0"Password"pInfo[playerid][Password], mysql129);
        
format(string,sizeof(string)," Login - %s"PlayerName(playerid));
        
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD,string," system have detected your username registered please login","Login","Exit");
    }
    else
    {
        
format(string,sizeof(string)," Register - %s"PlayerName(playerid));
        
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD,string," Welcome to "NAME"\ninput password and click register!","Register","Exit");
    }
    return 
1;

SOLVED
Reply
#4

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

Thanks for suggetion
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)