Hello, i am trying to convert a time span into a number that can be added to a player's balance, sort of like a wage system.
But the variable {_waited} is just none
How can i do this ?
Code:
on join:
if player has permission "Skript.Vagt":
set {Vagtløn.%uuid of player%} to now
on quit:
if player has permission "Skript.Vagt":
delete {Vagtløn.%uuid of player%}
command /løntest:
trigger:
if player has permission "Skript.Vagt":
set {_waited} to difference between {Vagtløn.%uuid of player%} and now
add {_waited} parsed as a number to player's balance
set {Vagtløn.%uuid of player%} to now
if {Vagtløn.Total.%uuid of player%} is not set:
set {Vagtløn.Total.%uuid of player%} to 0
add {_waited} parsed as a number to {Vagtløn.Total.%uuid of player%}
send "%{_waited} parsed as a number%" to player
How can i do this ?