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

Slapper Custom Plugin Help

Discussion in 'Plugin Help' started by princeace, Feb 26, 2020.

  1. princeace

    princeace Slime

    Messages:
    78
    GitHub:
    PrincessSeah
    [06:48:37] [Server thread/CRITICAL]: ParseError: "syntax error, unexpected '=', expecting ')'" (EXCEPTION) in "plugins/Slapper-Prince.phar/src/slapper/SlapperTrait" at line 90


    this is my code i put on my slapper plugin

    public function updateVars() {
    $vars = [
    line 89: "{players}" => $online = count($this->getServer()->getOnlinePlayers(),
    line 90: "{maxplayers}" = $this->getServer()->getMaxPlayers());
    ];
    }
     
  2. Gianluxx

    Gianluxx Slime

    Messages:
    94
    GitHub:
    Gianluxx
    you have to close the ) of count()
     
  3. Gianluxx

    Gianluxx Slime

    Messages:
    94
    GitHub:
    Gianluxx
    and remove the ) after getMaxPlayers()
     
  4. princeace

    princeace Slime

    Messages:
    78
    GitHub:
    PrincessSeah
    ok thanks

    can you help me what code i add in slappertrait to see player on other world or via many world plugin?
     
  5. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    facepalm
     
  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.