Hi i have this code
work everything except the conditions with balance dont work :/ i dont know why, dont throw me any error :/ can you help me pls?
Code:
create a gui with virtual chest with 1 rows named "Banco":
format gui 3 with gold block named "&aCantidad personalizada":
set {cuentas-banco::chat::%player%} to true
depositarpersonal(player)
function depositarpersonal(p: player):
close inventory of {_p}
send "&aEscribe la cantidad que quieras depositar&f." to {_p}
while {banco::%{_p}%::dinerotemp} is not set:
wait 10 ticks
if {banco::%{_p}%::dinerotemp} is set:
if balance of {_p} is less than {banco::%{_p}%::dinerotemp}:
send "&cNo tienes esa cantidad de dinero." to {_p}
delete {banco::%{_p}%::dinerotemp}
stop
else:
#execute console command "money take %{_p}% %{banco::%{_p}%::dinerotemp}%"
remove {banco::%{_p}%::dinerotemp} from balance of {_p}
add {banco::%{_p}%::dinerotemp} to {cuentas-banco::%{_p}%}
send "&aDepositaste %{banco::%{_p}%::dinerotemp}% &f." to {_p}
delete {banco::%{_p}%::dinerotemp}
set {cuentas-banco::chat::%{_p}%} to false
stop
on chat:
if {cuentas-banco::chat::%player%} is true:
cancel event
set {banco::%player%::dinerotemp} to message
stop
work everything except the conditions with balance dont work :/ i dont know why, dont throw me any error :/ can you help me pls?