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..
    • 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.
      Stellaron - The game does not end with Avatar anymore. Explore the wonders of the ancient megaengineering, build megastructures or create your unique mothership!
    • 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 ;)
      Stellaron - The game does not end with Avatar anymore. Explore the wonders of the ancient megaengineering, build megastructures or create your unique mothership!
    • 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.