Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

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.

Parameter Type
authority Authority
entity Entity
amount number

boolean