Jump to content

Economics Balance Check?

Gremlins 1.3.4

Somescrub
Somescrub

Posted (edited)

I'm not sure when it started, but running into an issue where I have two commands that run to handle the purchase of an item via economics cash. I noticed that this is executing the give item command, even though the player does not have the balance needed as part of the withdraw command executed. I do have negative balances disabled in the economics configuration, so it just takes whatever is available (even if 0) and gives you the item. I don't know if you have a better way of doing this, or if a check can be added before that withdraw command is able to execute? Here is the config below for this as a current example:

        "Message": "Secret Lab Chair for $2,500,000",
        "Needs Permission (null = No)": null,
        "Player Commands": [],
        "Server Commands": [
          "withdraw $userID 2500000",
          "GiveItem 567871954 1 0"
        ],
        "Next Message (null = Close UI)": null,
        "Price": 0,
        "Currency": {
          "Item ID": -151838493,
          "Skin ID": 0
        },
        "Insufficient Funds Message (null = Close UI)": null,
        "Cooldown": 1,
        "Server Wide Cooldown": true

Edited by Somescrub
Razor

Posted

For Economics

"Price": 25000,
"Currency": {
          "Item ID": 0001,
          "Skin ID": 0

 

Somescrub

Posted

Thank you so much, this worked perfectly!

Razor

Posted

Changed Status from Pending to Gremlins

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.3k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.