Can you show your register dialog and your login dialog?
Specifically your register and login under OnDialogResponse |
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_INPUT, "Registering...","{FF0000}You have entered an invalid password.\n""Type your password below to register a new account.","Register","Quit"); dini_Create(UserPath(playerid)); dini_Set(UserPath(playerid),"Password",inputtext); dini_IntSet(UserPath(playerid),"Cash",0); dini_IntSet(UserPath(playerid),"Admin",0); dini_IntSet(UserPath(playerid),"Kills",0); dini_IntSet(UserPath(playerid),"Deaths",0); dini_IntSet(UserPath(playerid),"WantedLevel",0); dini_IntSet(UserPath(playerid),"Vip",0); dini_IntSet(UserPath(playerid),"Score",0); dini_IntSet(UserPath(playerid),"Condoms",0); dini_IntSet(UserPath(playerid),"Banned",0); dini_IntSet(UserPath(playerid),"Jailed",0); dini_IntSet(UserPath(playerid),"Drugs",0); dini_IntSet(UserPath(playerid),"Nopm",0); dini_IntSet(UserPath(playerid),"Bank",0); dini_IntSet(UserPath(playerid),"Sausages",0); dini_IntSet(UserPath(playerid),"PassChange",0); dini_IntSet(UserPath(playerid),"Mute",0); ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,"{008000}Success!","{FF0000}Registered and autologged! Now all your data are saved. (Money,score,robberies,wanted level etc)","Ok",""); } } case DIALOG_LOGIN: { if (!response) return Kick(playerid); if( response ) { if(!strcmp(inputtext, dini_Get(UserPath(playerid), "Password"))) { ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,"{008000}Success!","{FFFF00}You have successfully logged in!","Ok",""); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","{FF0000}You have entered an incorrect password.\n""Type your password below to login.","Login","Quit"); } return 1; } } }
case DIALOG_LOGIN:
{
if (!response) return Kick(playerid);
if( response )
{
if(!strcmp(inputtext, dini_Get(UserPath(playerid), "Password", false)))
{
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,"{008000}Success!","{FFFF00}You have successfully logged in!","Ok","");
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","{FF0000}You have entered an incorrect password.\n""Type your password below to login.","Login","Quit");
}
return 1;
}
}
}
case DIALOG_LOGIN:
{
if (!response) return Kick(playerid);
if (!inputtext[0] || strcmp(inputtext, dini_Get(UserPath(playerid), "Password"))) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "{FF0000}You have entered an incorrect password.\nType your password below to login.", "Login", "Quit");
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX, "{008000}Success!", "{FFFF00}You have successfully logged in!", "Ok", "");
return 1;
}
C:\Users\Anurag\Desktop\3G CNR\gamemodes\3GCNR.pwn(6005) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning. |
case DIALOG_LOGIN: { if (!response) return Kick(playerid); if( response ) { if(!strcmp(inputtext, dini_Get(UserPath(playerid), "Password", false))) { ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,"{008000}Success!","{FFFF00}You have successfully logged in!","Ok",""); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","{FF0000}You have entered an incorrect password.\n""Type your password below to login.","Login","Quit"); } return 1; } } }
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_INPUT, "Registering...","{FF0000}You have entered an invalid password.\n""Type your password below to register a new account.","Register","Quit");
dini_Create(UserPath(playerid));
dini_Set(UserPath(playerid),"Password",inputtext);
dini_IntSet(UserPath(playerid),"Cash",0);
dini_IntSet(UserPath(playerid),"Admin",0);
dini_IntSet(UserPath(playerid),"Kills",0);
dini_IntSet(UserPath(playerid),"Deaths",0);
dini_IntSet(UserPath(playerid),"WantedLevel",0);
dini_IntSet(UserPath(playerid),"Vip",0);
dini_IntSet(UserPath(playerid),"Score",0);
dini_IntSet(UserPath(playerid),"Condoms",0);
dini_IntSet(UserPath(playerid),"Banned",0);
dini_IntSet(UserPath(playerid),"Jailed",0);
dini_IntSet(UserPath(playerid),"Drugs",0);
dini_IntSet(UserPath(playerid),"Nopm",0);
dini_IntSet(UserPath(playerid),"Bank",0);
dini_IntSet(UserPath(playerid),"Sausages",0);
dini_IntSet(UserPath(playerid),"PassChange",0);
dini_IntSet(UserPath(playerid),"Mute",0);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,"{008000}Success!","{FF0000}Registered and autologged! Now all your data are saved. (Money,score,robberies,wanted level etc)","Ok","");
}
}
}
case DIALOG_LOGIN:
{
if (!response) return Kick(playerid);
if (!inputtext[0] || strcmp(inputtext, dini_Get(UserPath(playerid), "Password"))) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "{FF0000}You have entered an incorrect password.\nType your password below to login.", "Login", "Quit");
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX, "{008000}Success!", "{FFFF00}You have successfully logged in!", "Ok", "");
}
}
return 1;
}