Solved adding balance to a variable

  • 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!

wrymain

Member
Feb 20, 2025
37
0
6
Python:
command /depositall:
    trigger:
        set {_p} to player
        set {_money} to {_p}'s balance
        add {_money} to {bank::%{_p}%}
        add 1 to {bank::%{_p}%}
        send "%{_money}% | %{bank::%{_p}%}%"

adding {_money} to {bank::%{_p}%} does not work but adding 1 works. i also notice that {_money} debugged "$value". so how can i add player's balance to the bank?
 
The balance expression is a little weird, I found that setting the variable to the variable + balance gets around this.

Example:
Code:
set {bank::%{_p}%} to {bank::%{_p}%} + {_p}'s balance
 
  • Like
Reactions: wrymain