Solved How to take player's balance from an integer?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
code_language.skript:
message "You have %player's money%" # the currency name will be added automatically
remove 20$ from the player's balance # replace '$' by whatever currency you use
add 200 to the player's account # or omit the currency alltogether
 
code_language.skript:
message "You have %player's money%" # the currency name will be added automatically
remove 20$ from the player's balance # replace '$' by whatever currency you use
add 200 to the player's account # or omit the currency alltogether
Does not answer the question, I'm trying to add the amount the player needs to buy something in an item lore, in a menu.
 
Like this?
code_language.skript:
%(player's money)-1000%
 

That's not what they're asking, they're asking to take the player's balance and subtract it from an integer, not the other way around. Read the post fully.

If your "1000 - player's balance" doesn't work, you can try parsing their balance as a number instead:

code_language.skript:
set {_val} to 1000 - ("%player's balance%" parsed as a number)
 
That's not what they're asking, they're asking to take the player's balance and subtract it from an integer, not the other way around. Read the post fully.

If your "1000 - player's balance" doesn't work, you can try parsing their balance as a number instead:

code_language.skript:
set {_val} to 1000 - ("%player's balance%" parsed as a number)
Dw, I just switched it around, thanks :emoji_grinning:
 
Status
Not open for further replies.