Jump to content

[Help] Math in Java


Juggles

Recommended Posts

My account needs to keep 4.3m gold in the inventory. The amount of gold before muling is a number above 4.3m. 

So I used the equation

 

amount in inventory - 4.3m = amount to trade


So in my code I put 

long x = getInventory().getAmount(995);

long amountToTrade = x - 4300000;

 

Now in my mule code, I put

trade.offer(995, amountToTrade);

 

Sadly this does not work even though all the math makes sense. 
I know the string requires an int but I cannot use int when i am getting the amount in the inventory. 

Any help or suggestions would be greatly appreciated :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...