GUI in a GUI error

Discussion in 'Skript' started by Dogpoo, Mar 24, 2020.

  1. Hello, I am trying to create a very simple custom crafting skript for viewing all of the recipes. I keep getting an error with the attached code and the error only goes away once I remove one of the secondary GUI's. Any help is appreciated.

    Code (Text):
    command /crafts:
       trigger:
           create a gui with virtual chest named "Custom Crafting Recipes" with 3 rows:
               make gui slot 8 to barrier named "&cExit":
                   close player's inventory
               make gui slot 10 to iron pickaxe named "&fIron Hammer" with lore "||&7Click to view the recipe for the Iron Hammer":
                   close player's inventory
                   create a gui with virtual chest named "Iron Hammer Recipe" with 5 rows:
                       make gui slot 10,12,28,30 with 101
                       make gui slot 11,19,21,29 with iron block
                       make gui slot 25 with glowing iron pickaxe named "&fIron Hammer" with lore "||&7Mines a 3x1x1 Area"
                       make gui slot 20 with iron pickaxe
                       make gui slot 0,1,2,3,4,5,6,7,8,9,13,14,15,16,17,18,22,23,24,26,27,31,32,33,34,35,36,37,38,39,40,41,42,43,44 with gray glass named ""
                   open last gui to player
               make gui slot 11 to glowing iron pickaxe named "&fIron Hammer" with lore "||&7Click to view the recipe for the Iron Hammer":
                   close player's inventory
                   create a gui with virtual chest named "Iron Hammer Recipe" with 5 rows:
                       make gui slot 10,11,12,19,21,28,29,30 with iron block
                       make gui slot 25 with glowing iron pickaxe named "&fIron Hammer" with lore "||&7Mines a 3x3x1 Area"
                       make gui slot 20 with iron pickaxe
                       make gui slot 0,1,2,3,4,5,6,7,8,9,13,14,15,16,17,18,22,23,24,26,27,31,32,33,34,35,36,37,38,39,40,41,42,43,44 with gray glass named ""
                   open last gui to player
           open last gui to player
           stop
    Error: "You can't make a gui outside of 'create/edit gui; effect. (crafts.sk, line 15: make gui slot 11 to glowing iron pickaxe named "&fIron Hammer" with lore "||&7Click to view the recipe for the Iron Hammer":"')"
     
  2. Trying using Tuske for GUI's better in my opinion.
     
    • Like Like x 1
    • Agree Agree x 1
  3. pretty sure this is tuske already
     
    • Agree Agree x 1
  4. Hmmm, if it is, he's using it differently then I do.
     
  5. there are only 3 ways to make guis in skript, vanilla, skquery, tuske

    skquery doesn't have multiline actions support, vanilla requires on inventory click, so it's definitely tuske I think
     
  6. Fair enough :D
     
  7. Multiline actions support? You can do that with SkQuery, you just need to use a function.
     
  8. I guess you can, but no point to use skquery over vanilla guis