Can't set items in a player's slot to variable

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

AndreasLK

Member
Mar 12, 2020
16
0
1
19
Code:
            open chest with 3 rows named "&6&lKøb" to player
            wait 1 tick
            format slot 0 of player with green wool named "&a&l+" to run [set {crypto.%player%.amount} to {crypto.%player%.amount}+1]->[format slot 1 of player with black wool named "&7&l%{crypto.%player%.amount}%" to close]->[set {_crypto.number.%player%} to 5]
            format slot 1 of player with {_crypto.number.%player%} black wool named "&7&l%{crypto.%player%.amount}%" to close
            format slot 2 of player with red wool named "&4&l-" to run [set {crypto.%player%.amount} to {crypto.%player%.amount}-1]->[format slot 1 of player with black wool named "&7&l%{crypto.%player%.amount}%" to close]->[set {crypto.number.%player%} to "%{crypto.%player%.amount}% black wool"]
I can't set the number of items with a variable. It just returns a failure. If I set it to something like 5 it works. But not when this number is represented by a variable. Can anyone help?
 
Vanilla guis also work on 1.8.
Also I didn't say to put %% around it,

{} Of %item%

You simply forgot "of"

Also don't use format slot. You'll have a lot of trouble switching to vanilla guis anyway because your method of making guis is buggy.
 
Thank you so much, sir!
I really appreciate your help!
[doublepost=1584887198,1584887164][/doublepost]Slight problem..... It doesn't work even if I put "of" in......
 
Status
Not open for further replies.