#Variables cannot be used here

1 messages · Page 1 of 1 (latest)

ember cargo
#

I will try to set in a variable for use on make gui

mellow fiber
#
  1. {_t} is already a text when you defined it in your display() function, so you don't need to put it around quotes when you use your hasperm() function
  2. On line 13, you put the hasperm() function in quotes, but then your {_t} variable is also in quotes but there's no percent % signs around it so Skript will treat it as literally {_t} instead of whatever {_t} is in your original function's parameters
  3. I would set a variable such as {_check} to be the value of your hasperm() function, and then displaying that in the item's lore (it will make your code parse faster, and thus run better)
ember cargo
#
    create a new gui with virtual chest inventory named "&6➽ &eKit &f%{_t}%" with 5 rows:
        make gui slot 27,28,29,30,31,32,33,34 and 35 of {_p} with black stained glass pane named "" 
        make gui slot 37 of {_p} with arrow named "&6» &7Retour en arrière":
            kit("%{_p}%")
        set {_check} to hasperm({_p}, {_t})
        set {_s} to 0
        loop {kit::%{_t}%::item::*}:
            make gui slot {_s} with loop-value 
            add 1 to {_s}

        make gui slot 40 with book named "&6» &eObtenir le kit &f%{_t}%" with lore "||&cPensez à avoir &4suffisamment||&cde place dans votre inventaire":
            if {_check} = "&a✔":
                givekit(player, "%{kit::%{_t}%}%", {kit::%{_t}%::time})
                close player's inventory
            else:
                send "&8» &cVous n'avez pas la permission d'obtenir le kit &4%{_t}%" to {_p}
        make gui slot 43 with barrier named "&6» &cQuitter le menu":
            close player's inventory
    open the last gui for {_p}```
#

no error

ember cargo
#
    permission: {@permission_createkit}
    permission message: {@permission_message}
    trigger:
        if arg 1 is set:
            send "test1" to player
            if arg 2 is set:
                send "test2" to player
                if arg 3 is set:
                    if {kit::%arg 1%} is set:
                        send "{@kit_already_exist}"
                    else:
                        if size of {kit::*} = 17:
                            send "{@kit_max_size_error}"
                        else:
                            if "{@kit_item_feedback}" is "true":
                                send "&eItem du kit &6%arg 1%:"
                            loop all items in player's inventory:
                                if loop-value isn't air:
                                    add loop-value to {kit::%arg 1%::item::*}
                                    if "{@kit_item_feedback}" is "true":
                                        send "&a%loop-value%"
                            set {kit::%arg 1%} to arg 1
                            set {kit::%arg 1%::time} to arg 2
                            set {kit::%arg 1%::material} to arg 3
                            send "{@kit_create_confirmation}"
                else:
                    send "{@kit_create_error}"
            else:
                send "{@kit_create_error}"
        else:
            send "{@kit_create_error}"
#

I can't set the timespan

#

I tried 1:00:00

#

1 hour

#

1h

#

1 h

#

not working