spendCoins
spendCoins(
authority,entity,amount):boolean
Takes amount coins off the entity’s wallet where it holds them all,
and returns true; where it holds fewer, or has no wallet, it takes
none and returns false, so a shop sells whole or not at all. A spend
never lowers the coins its world has credited. Zero succeeds and changes nothing. An
amount below 0, or no finite number, throws, as addCoins does.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
authority |
Authority |
entity |
Entity |
amount |
number |
Returns
Section titled “Returns”boolean