I'm trying to code a feature where when you click a sign with certain text on it, you will purchase a rank (if you have enough money).
I'm using a plugin to import Placeholders from PlaceholderAPI, and if I test out the placeholder for balance, it registers as $350. But, the code doesn't give me the rank. It instead goes to where the < symbol is. I don't know why the code isn't working, but I feel like it isn't recognizing {_balance} as an integer. Any help would be amazing!
Code:
on rightclick on sign:
if line 2 is "Plus Rank":
set {_balance} to value of placeholder "vault_eco_balance_fixed" from player
set {%player%.rank} to value of placeholder "vault_rank" from player
if {%player%.rank} is "default":
if {_balance} is greater than 174:
make console execute command "/lp user %{playername}% parent set plus"
send "Successfully purchased Plus Rank!"
make console execute command "/eco take %player% 175"
else:
if {_balance} is less than 175:
send "&cYou don't have enough Gems!" to player
else:
send "%{_balance}%" to player <
else:
send "&cYou already have a better rank! All of the stuff from the previous ranks pass over." to player