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.
    • 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 ;)