Solved Formatting gui issue

  • 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.

Jeroeno_Boy

Active Member
Jun 2, 2017
61
2
8
24
Soo i have a prob with the Gui, bdw dont blame me beacuse i use format, it always works 4 me.

Code:
code_language.skript:
function Looting(P: player):
    open chest with 3 rows named "&lCrate" to {_P}
        set {_Amount.%{_P}%} to random integer between 1 and 35
        format slot {Slots.%{_P}%} of {_P} with {_Amount.%{_P}%} gray dye named "&eRifle Ammo" to be unstealable
        add 1 to {Slots.%{_P}%}

Error:
code_language.skript:
Can't undertand this condition/effect: format slot {Slots.%{_P}%} of {_P} with {_Amount.%{_P}%} gray dye named "&aRifle Ammo" to be unstealable

I know the issue is comming from {_Amount.%{_P}%} but i dont know a diffren way to make random items in the same slot
 
Last edited:
First of all, don't use skQuery's format slot, just don't, it has several bugs and isn't recommended. You can use TuSKe's GUI Manager (which is very similar) or set slot with the inventory click event, either way is better. Other thing, you don't have to suffix local variables with the player's name, it's just useless because these are deleted when the trigger is done.

Anyways, the issue is that you've missed an "of" between the amount and the item type.
 
First of all, don't use skQuery's format slot, just don't, it has several bugs and isn't recommended. You can use TuSKe's GUI Manager (which is very similar) or set slot with the inventory click event, either way is better. Other thing, you don't have to suffix local variables with the player's name, it's just useless because these are deleted when the trigger is done.

Anyways, the issue is that you've missed an "of" between the amount and the item type.
wow cant believe i missed that, i made a lot of guis before but i never used it with a random amount but thanks for helping
 
Status
Not open for further replies.