Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: checking username

  1. #11
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    every time I check, so it is

    test account:
    scriptdata\account\dsadsa.czolg
    dsadsa,dadsa,
    Error : No such user
    Last edited by malyczolg; 1st November 2013 at 16:00.

  2. #12
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    PHP Code:
            if(response == "create")
            {
                
    name self.typedvalutelogin;
                
    openfile("account/" name ".czolg""write");
                
    fprintln(fself.typedvalutelogin);
                
    fprintln(fself.typedvalutepassword);
                
    closefile(f);
                
                
    self iprintlnbold("account created name : " self.typedvalutelogin " / password : "self.typedvalutepassword);
            }
                
            if(
    response == "login")
            {
                
    self.writelogin 0;
                
    self.writepassword 0;
                
                if(
    self.typedvalutelogin=="")
                {
                    
    self iprintlnbold("Please specify a name");
                    continue;
                }
                else if(
    self.typedvalutepassword==""
                {
                    
    self iprintlnbold("Please specify a password");
                    continue;
                }
                else if(
    self.typedvalutelogin.size 3)
                {                
                    
    openfile("account/" self.typedvalutelogin ".czolg","read");
                    if(
    fgetarg(f,0) != self.typedvalutelogin)  
                    {
                        
    self iprintlnbold("bad login");
                        continue;
                    }
                    
                    
    freadln(f);
                    if(
    fgetarg(f,1) != self.typedvalutepassword
                    {
                        
    self iprintlnbold("bad password");
                        
    closefile(f);
                        continue;
                    }
                }
                else if(
    self.typedvalutelogin.size <= 3)
                {
                    
    self iprintlnbold("atleast 3 letters");
                }
            } 
    how fix this error ?
    Attached Thumbnails Attached Thumbnails shot0001.jpg  
    Last edited by malyczolg; 1st November 2013 at 16:32.

  3. #13
    Private
    Join Date
    Jan 2013
    Location
    Hungary
    Posts
    113
    Thanks
    10
    Thanked 74 Times in 45 Posts
    Print the value of "self.typedvalutelogin" -.- And what kind of extension .czolg? Do not try to create your own extension please. Maybe it also can be an error.

  4. #14
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    this same
    help

  5. #15
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    does it create a file?

    or isnt there any file?

  6. #16
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    mod create scriptdata files

  7. #17
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    The file is being created, but it can't read the format because it isn't text-based, and so is acting like the file doesn't exist. Use .txt for the format instead.

  8. #18
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    Quote Originally Posted by Tally View Post
    The file is being created, but it can't read the format because it isn't text-based, and so is acting like the file doesn't exist. Use .txt for the format instead.
    edit and this same :

    PHP Code:
            if(response == "login")
            {
                
    self.writelogin 0;
                
    self.writepassword 0;
                
                if(
    self.typedvalutelogin=="")
                {
                    
    self iprintlnbold("Please specify a name");
                    continue;
                }
                else if(
    self.typedvalutepassword==""
                {
                    
    self iprintlnbold("Please specify a password");
                    continue;
                }
                else if(
    self.typedvalutelogin.size 3)
                {                
                
                    
    file openFile("account/" self.typedvalutelogin ".txt""read");
                    if(
    file == -1)
                    {
                        
    self iprintlnbold("bad login");
                        continue;
                    }
                                
                    
    //freadln(f);
                    
    if(fgetarg(file,1) != self.typedvalutepassword
                    {
                        
    self iprintlnbold("bad password");
                        
    closefile(file);
                        continue;
                    }
                }
                else if(
    self.typedvalutelogin.size <= 3)
                {
                    
    self iprintlnbold("atleast 3 letters");
                }
            } 
    Attached Thumbnails Attached Thumbnails Bez tytułu.png  

  9. #19
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Bad luck then. Looks like you are not ready to be doing file functions. Perhaps in a couple of years, once you've mastered how to script, you might be ready.

    Why not try something else? I hear knitting is fun. Or, you could always try making models with matchsticks and glue.

  10. #20
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    can u tell me where is error ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •