Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: checking username

  1. #21
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    i still fail to see how you are actually debuggin this.

    i see no iprintlns printing the filename its trying to write to.
    i see no iprints whatsoever for debugging.

    Are you sure you wanna fix this code or are you just wasting our time?

  2. #22
    Sergeant EvoloZz's Avatar
    Join Date
    Sep 2012
    Location
    Helsinki, Finland
    Posts
    360
    Thanks
    314
    Thanked 167 Times in 120 Posts
    Quote Originally Posted by Tally View Post
    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.
    Couple of years? LOL? I learned the basics in ½ year, and file reading/writing in few weeks.
    In case that was sarcasm, its hard to detect like that...

  3. #23
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    I found a bug, but I can not solve it.
    creating account work .

    why not read asd.txt?

    create test account:
    PHP Code:
        if(response == "create")
        {        
                
    f=openfile("asd.txt""write");
                
    fprintln(fself.pers["typedvalutelogin"]);
                
    fprintln(fself.pers["typedvalutepassword"]);
                
    closefile(f);
            
            
    self iprintlnbold("account created name : " self.pers["typedvalutelogin"] + " / password : "self.pers["typedvalutepassword"]);
            continue;
        } 
    PHP Code:
        if(response == "login")
        {
            
    self.writelogin 0;
            
    self.writepassword 0;
            
            
    f=openfile("asd.txt","read");
            
    freadln(f);
            
    self.checklogin int(fgetarg(f,0));
            
    self.checkpassword int(fgetarg(f,1));
            
    closefile(f);
                    
            if(
    self.pers["typedvalutelogin"]=="")
            {
                
    self iprintlnbold("Please specify a name");
                continue;
            }
            else if(
    self.pers["typedvalutepassword"]==""
            {
                
    self iprintlnbold("Please specify a password");
                continue;
            }
            else if(
    self.pers["typedvalutelogin"].size 3)
            {             
                
    self iprintlnbold(self.checklogin+" / "+self.checkpassword);
                
                if(
    self.checklogin != self.pers["typedvalutelogin"])
                {
                    
    self iprintlnbold("login niepasuje:"+self.checklogin+" / "self.pers["typedvalutelogin"]);
                    continue;
                }
                
                if(
    self.checkpassword != self.pers["typedvalutepassword"])
                {
                    
    self iprintlnbold("haslo niepasuje:"+self.checkpassword+" / "self.pers["typedvalutepassword"]);
                    continue;
                }
                        
            }       
            else if(
    self.pers["typedvalutelogin"].size <= 3)
            {
                
    self iprintlnbold("atleast 3 letters");
                continue;
            }
        } 

  4. #24
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    DEBUG WITH DEVELOPER 1. AND ADD IPRINTS AND POST THEM HERE

  5. #25
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    no errors ;
    on developer 1 / developer 2
    Last edited by malyczolg; 2nd November 2013 at 09:29.

  6. #26
    Private
    Join Date
    Jan 2013
    Location
    Hungary
    Posts
    113
    Thanks
    10
    Thanked 74 Times in 45 Posts
    You are totally unsuitable for scripting
    At first:
    What is checklogin?
    Password contains only numbers? If no, why the hell you convert to integer the string?
    Please use that frigging iPrintln() to print the values of the variables. We are not wizards who can read your minds.
    And finally, write an acceptable script, because it's less than amateur.

Posting Permissions

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