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

Take a number in config minus

Discussion in 'Development' started by EnteMomo, Jul 12, 2017.

  1. EnteMomo

    EnteMomo Silverfish

    Messages:
    22
    GitHub:
    Joshiiiii
    Hey Guys, I Need ur help!

    I´ve made a LobbySystem for my Server and I have made something where you can buy Special Items in the Lobby for Coins, it works all fine, but it don´t take the Coins in the Config.

    Here´s the Code:
    $pcfg = new Config("/home/Datenbank/Players/".strtolower($event->getPlayer()->getName()).".yml", Config::YAML);
    $coins = $pcfg->get("Coins");
    $coinsnew = $coins - 25000;
    $pcfg->set("Coins", $coinsnew);
     
  2. EnteMomo

    EnteMomo Silverfish

    Messages:
    22
    GitHub:
    Joshiiiii
    Oh, thankss :D
     
  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.