#Command Cooldowns Help

1 messages · Page 1 of 1 (latest)

rose sandal
#

I have a command that looks like this:

    permission: default
    cooldown: 1 day
    cooldown storage: {kit::daily::%player's uuid%}
    cooldown message: &b&lSide&f&lChuck &7>> &cThis kit is on cooldown for &e%remaining time%&c!
    trigger:
        execute console command "/givecoins %player% 250" 
        broadcast "&b&lSide&f&lChuck &7>> &a%player% &fhas claimed their daily &2250 &aSlime&fCoins! &7&o(/kits)"
        play sound "ENTITY_PLAYER_LEVELUP" with pitch 0.5 for all players```

Whenever a player runs it, it send this in console:
```Variable {kit::daily::b3a9d591-e51a-4be1-a160-94046d6d86a9} was not a date! You may be using this variable elsewhere. This warning is letting you know that this variable is now overridden for the command storage.```
What does it mean and how do I fix it?
It also doesn't clear the variable when the cooldown is over. I would like it to but it doesn't work for some reason :(
onyx dew
#

um

#

do you even need that variable?

rose sandal
#

Uh

#

Now that you mention it

#

Actually I use it here

function kitCheck(p: player, perm: string, tag: string, slot: number, name: string, lore: string, cd: string):
    if {_p} has permission {_perm}:
        if {kit::%{_tag}%::%{_p}'s uuid%} isn't set:
            set slot {_slot} of metadata tag "kits" of {_p} to lime stained glass pane named {_name} with lore "&7----------------", {_lore}, "&9Cooldown: &b%{_cd}%" and "&7----------------"
        else:
            set slot {_slot} of metadata tag "kits" of {_p} to red stained glass pane named {_name} with lore "&7----------------", {_lore}, "&9Cooldown: &b%{_cd}%", "&7----------------" and "&c&oOn Cooldown"
    else:
        set slot {_slot} of metadata tag "kits" of {_p} to red stained glass pane named {_name} with lore "&7----------------", {_lore}, "&9Cooldown: &b%{_cd}%", "&7----------------", "&c&oYou need %{_perm}% rank" and "&c&ofor this!"```
Could I do anything to replace it?
Because other than that, it's true that I don't use the variable at all