Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help

Comments in 'Plugin Development' started by xiaoq, Sep 6, 2015.

  1. xiaoq
    Offline

    xiaoq Active Member

    Joined:
    Dec 23, 2014
    Posts:
    232
    Minecraft User:
    xiaoq
    PHP:
    $p $this->time[strtolower($player->getName())];
    $p['point'] = $p['point'] + 1;
    This is my code

    after I echo $p['point'], it is 0
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Try using $p &= $this... instead of $p = $this...
    In PHP, arrays are automatically cloned unless you get by reference.

Share This Page

Advertisement