Why $GLOBALS['DATABASE']->query is not working but $USER["atm"] += $cost; is working?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Why $GLOBALS['DATABASE']->query is not working but $USER["atm"] += $cost; is working?

      I try to edit premium market mod and make it that when you buy premium antimatter is sent to admin. But it doesn't work.

      If I do like this it adds AM to user that bought it.

      $USER["atm"] += $cost;

      But when I edit it to this:

      $GLOBALS['DATABASE']->query("UPDATE ".USERS." SET `atm` = `atm` + ".$cost." WHERE `id` = '1';");

      It doesn't do anything. Pls. help I tried many ways but I can not understand why..
    • 2moons version ?
      2moons 2.0 OPEN Demo
      Thank you to send by ticket or message or via the forum in the part made for this purpose for all problems.

      Download version 2.0 here
      Shop Mods and Games HERE

      -------------------------------------------------------
      My personal game
      OUnivers - Open
      Xterium - Comming Soon - No code is taken from available versions
    • Danter14 wrote:

      2moons version ?
      Maybe not 2moons. Globals database is 1.7.3 or DatabaseBC.class.php. He's talking about antimatter so maybe thisishowwedoit 2.0 2moons revolution.
      Looking for good VPS to host your game? Use DigitalOcean and get 10$ bonus credit!

      Stellaron - Grand Strategy OGame Universe, discover the secrets of Ancient Technology
      Upcoming expansion: Stellaron StarGate
    • Thisishowwedoit wrote:

      Nope not my version, in my db its antimatter and not atm
      I meant the old version you made free on github. Maybe im confusing but I thought I have seen there "atm" on database.

      My bad ;)
      Looking for good VPS to host your game? Use DigitalOcean and get 10$ bonus credit!

      Stellaron - Grand Strategy OGame Universe, discover the secrets of Ancient Technology
      Upcoming expansion: Stellaron StarGate
    • Now it works I think that it didn't work because I used it in the public function. Thanks. I have 1.7.x version I bought it from one guy like a year ago.