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 ?
      I remain at your disposal on the forum for any questions or help.

      A help is of course not a creation of a mod



      -------------------------------------------------------
      Spaccon
      • Uni Xterium Comming Soon
      • Uni Ogame Comming Soon
    • 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!

      Private project - stellaron.space
    • 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!

      Private project - stellaron.space
    • 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.