1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Error with fuction

Discussion in 'Development' started by DanielYTK, Feb 15, 2017.

  1. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    Code:
    PHP:
        public function gerarKey($tamanho 10$maiusculas true$numeros true){
            
    $lmin 'abcdefghijklmnopqrstuvwxyz';
            
    $lmai 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
            
    $num '1234567890';
           
            
    $caract "";
            
    $retorno "";
           
            
    $caract .= $lmin;
            if(
    $maiusculas$caract .= $lmai;
            if(
    $numeros$caract .= $num;
           
            
    $len strlen($caract);
            for(
    $n 1$n <= $tamanho$n++){
                
    $rand mt_rand(1$len);
                
    $retorno .= $caract[$rand-1];
            }
            return 
    $retorno;
        }
     
    Error:
    Code:
    [22:12:22] [Server thread/INFO]: An unknown error occurred while attempting to perform this command
    [22:12:22] [Server thread/CRITICAL]: Unhandled exception executing command 'key' in key: Call to undefined function Keys\gerarKey()
    [22:12:22] [Server thread/CRITICAL]: Error: "Call to undefined function Keys\gerarKey()" (EXCEPTION) in "/zip_Keys_v2_rFNwRYPlOBRLsSH/src/Keys/Main" at line 46
     
    Line 46:
    PHP:
                     $gerar gerarKey(10); 
     
  2. Redux

    Redux Spider Jockey

    Messages:
    49
    GitHub:
    reduxredstone
    PHP:
    $gerar $this->gerarKey(10);
     
    jasonwynn10 likes this.
  3. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    this needs to be in the facepalm section
     
    Muqsit likes this.
  4. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    Hold up!
    what are you even doing with cryptography!
     
  5. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    It is not encryption, I just need MAIUSCULAS and MINUSCULAS and numbers.
     
    Muqsit likes this.
  6. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    thx
     
    jasonwynn10 likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.