Help, i need a total amount of a Multiply

Discussion in 'Plugin Development' started by PistoFrancoPuumm, Oct 4, 2015.

Thread Status:
Not open for further replies.
  1. hi, i need to see the = of that Multiply

    Code:
    eco.bankWithdraw(p.getName(), itemsNumb*10);
    example.

    i put in the console /buy wood 32 (32 equals to itemsNumb) and a block withdraw 10 dollars...

    32x10 = 320 and i need to see that... how i did?



    thanks guys :D
     
    Last edited: Oct 4, 2015
  2. Offline

    adam753

    What?
     
  3. i need to se the = of (itemsNumb) that equals to the number of i put in the console. exampl.

    i put in the console /buy wood 32 (32 equals to itemsNumb) and a block withdraw 10 dollars...
    i need to see the the equals

    u do know me?
     
    Last edited: Oct 4, 2015
  4. Offline

    Scimiguy

    Code:
    Double total = itemsNumb * price;
    
    sender.sendMessage("Charging you: $" + total);
    eco.bankWithdraw(p.getName(), total);
    Where price is the cost of the item, per item (In this case 10.0)
     
  5. Offline

    TheArabianCoder

    @adam753 I think he means that he wants the answer to a multiplication question.

    For example, if types "/buy wood 32" into console, and if each block is worth $10, how he would find the answer to 32 x 10, and withdraw the answer from the player's balance.
     
Thread Status:
Not open for further replies.

Share This Page