"You must be logged in to use the chat"
#1

I have no idea what's going on. I am using this login system with YINI and Whirlpool: https://sampforum.blast.hk/showthread.php?tid=352703

When I log in, in the CMD prompt it shows "YSI Error: Could not find or create file /users/Lamar.ini"
Whenever I type anything, it comes up with the thread name error. And when trying to /q and log back in, the password is incorrect. Really need some help here.
Reply
#2

You must create folder 'Users' in scriptfiles.
Reply
#3

Still, even after I add that folder I still get "you must be logged in to use the chat" and the password is incorrect when relogging.
Reply
#4

Just updated to the newest version of YSI, still getting this..
Reply
#5

This is where I think something is wrong:
pawn Код:
if(dialogid == dlogin) //If dialog id is a login dialog
    {//then
        if(!response) return Kick(playerid); //If they clicked the second button "Quit", we will kick them.
        if(response) //if they clicked the first button "Register"
        {//then
            new hashpass[129]; //Will create a new variable to hash his/her password
            WP_Hash(hashpass,sizeof(hashpass),inputtext); //Will hash inputted password
            if(!strcmp(hashpass, pInfo[playerid][Pass], false)) //If they have insert their correct password
            {//then
                INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);//We will load his account's data from user's path
                SetPlayerScore(playerid,pInfo[playerid][Scores]);//We will get their score inside of his user's account and we will set it here
                GivePlayerMoney(playerid,pInfo[playerid][Money]);//As explained above
                SendClientMessage(playerid,-1,"Welcome back! You have successfully logged in");//Tell them that they've successfully logged in
                SpawnPlayer(playerid);
            }
            else //If they've entered an incorrect password
            {//then
                ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Login","Welcome back. This account is registered. \nInsert your password to login to your account.\nIncorrect password!","Login","Quit");//We will tell to them that they've entered an incorrect password
                return 1;
            }
        }
    }
When typing the correct password, it now goes to the spawn, but it doesn't display the "You have been succesffuly logged in" message above.
Reply
#6

bump, really am mind boggled on this :L
Reply
#7

I'll just leave this here as noone wants to repeat himself "ten thousand times"
Quote:
Originally Posted by ******
Посмотреть сообщение
Ignore everything everyone has said so far - the first thing you write is NOT a saving system. You download one and call it a day! Unless, of course, you enjoy password leaks and exploits, in which case have fun getting no players.

I've said it dozens of times before - DO NOT try write your own user system, they are the one part of your code that it is essential to get right for other people's security. Bugs elsewhere don't matter much, they are just a minor inconvenience. Bugs here are SERIOUS.
https://sampforum.blast.hk/showthread.php?tid=436825
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)