[HELP] Refusing to login
#1

This is the problem, it works great until I logout and edit my %s.ini file, I was about to edit my admin rank to 1338.
After editing and trying to login it just tells me Invalid Password.

Here is my full script:

http://pastebin.com/f35a3799

Thank you for all your help
Reply
#2

Try returning 1 in both if(userfile) and else if.
And then there is already return 1 outside.
Reply
#3

Quote:
Originally Posted by DJDhan
Try returning 1 in both if(userfile) and else if.
And then there is already return 1 outside.
Can you show me in a little more detail how to do it
Reply
#4

Код:
if (UserFile)
783.    {
784.        new valtmp[128];
785.        fread(UserFile, valtmp);strmid(PlayerInfo[playerid][pPassword], valtmp, 0, strlen(valtmp)-1, 255);
786. 
787.        if ((strcmp(PlayerInfo[playerid][pPassword], string, true, strlen(valtmp)-1) == 0))
788.        {
789.            new key[128],val[128];
790.            new Data[128];
791.            while(fread(UserFile,Data,sizeof(Data)))
792.            {
793.                key = ini_GetKey(Data);
794.                if( strcmp( key , "Admin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
795.                if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMoney] = strval( val ); }
796.                if( strcmp( key , "Team" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTeam] = strval( val ); }
797.                GivePlayerMoney(playerid,PlayerInfo[playerid][pMoney]);
798.            }
799.            fclose(UserFile);
800.            gPlayerLogged[playerid] = 1;
801.            gPlayerAccount[playerid] = 1;
802.          GetPlayerName(playerid, pname3, sizeof(pname3));
803.            format(string3, sizeof(string3), "You have been successfully logged in");
804.            SendClientMessage(playerid, 0xFFFFFFFF,string3);return 1;
805.        }
806.        else
807.        {
808.            SendClientMessage(playerid, 0xC0C0C0FF, "    Invalid Password");
809.            fclose(UserFile);return 1;//maybe return 0
810.        }
811.    }
812.    return 1;
813.}
try replacing with this.
Not sure
Reply
#5

Sorry for a late answer, but this didnt fix it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)