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

Solved Couldnt load tick

Discussion in 'Development' started by xXNiceAssassinlo YT, Feb 8, 2018.

  1. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    Error:
    PHP:
    Could not tick level "world"microtime() expects parameter 1 to be booleaninteger given
    [15:24:19] [Server thread/CRITICAL]: TypeError"microtime() expects parameter 1 to be boolean, integer given" (EXCEPTIONin "CLAAPI-master/src/CLADevs/utils/Timings" at line 30
    Full Code:
    PHP:
        public static function startTiming(string $description): bool{
            
    self::$timingsHolder[$description] = round(microtime(1));
        }
    Line 30 code:
    PHP:
    self::$timingsHolder[$description] = round(microtime(1));
    Thanks for help.
     
  2. SalmonDE

    SalmonDE Zombie Pigman

    Messages:
    739
    GitHub:
    SalmonDE
    Replace "microtime(1)" with "microtime(true)".
    Look at the parameter specification of the function on php.net to find out why.
     
    xXNiceAssassinlo YT likes this.
  3. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    I was being dumb...
     
    jasonwynn10 likes this.
  4. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    Error already gave you answer.. Or is that hard to read?
     
    Az928 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.