1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can't run multiple lines of code with format slot?

Discussion in 'Skript' started by OneBigMeatball, Apr 8, 2019.

Thread Status:
Not open for further replies.
  1. OneBigMeatball

    OneBigMeatball New Member

    Joined:
    Apr 8, 2019
    Messages:
    8
    Likes Received:
    0
    Is there a way to put multiple lines of code in [] when you do format slot (number) of player with (item) to close then run [here]?

    and I dont want it to make the player run or make the console run a command because I want to use event-block in it like this:

    on rightclick on gold block:
    format slot 13 of player with oak sapling to close then run [set block at block 1 above event-block to oak log, set block at block 2 above event-block to oak log, etc.]

    btw sorry for my bad english its not my native language so if you dont understand something about my question pls ask
     
  2. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    I think it's like this: [effect 1]->[effect 2]. But you should use TuSKe, it's easier to run multiple effect using TuSKe:
    Code (Text):
    1. create gui slot 13 of player with oak sapling to run:
    2.     close inventory of player
    3.     set block at block 1 above event-block to oak log
    4.     set block at block 2 above event-block to oak log
     
  3. OneBigMeatball

    OneBigMeatball New Member

    Joined:
    Apr 8, 2019
    Messages:
    8
    Likes Received:
    0
    The [effect1]->[effect2] thing works, but is there a way to add if statements to it? for example: if something is true > do this
     
  4. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
  5. OneBigMeatball

    OneBigMeatball New Member

    Joined:
    Apr 8, 2019
    Messages:
    8
    Likes Received:
    0
  6. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    Show your code
     
  7. OneBigMeatball

    OneBigMeatball New Member

    Joined:
    Apr 8, 2019
    Messages:
    8
    Likes Received:
    0
    on right click on gold block:
    open chest with 3 rows named "Menu" to player
    format slot 13 of player with oak wood planks named "test" to close then run [set block above event-block to oak planks if {balance::%player%} is more than or equal to 100]->[subtract 100 from {balance::%player%} if {balance::%player%} is more than or equal to 100]
     
  8. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    Can you add a debug message after the open chest line?
    Also, try waiting a tick since SkQuery has bugs
     
  9. OneBigMeatball

    OneBigMeatball New Member

    Joined:
    Apr 8, 2019
    Messages:
    8
    Likes Received:
    0
    like this?
    on right click on gold block:
    open chest with 3 rows named "Menu" to player
    message "test"
    format slot 13 of player with oak wood planks named "test" to close then run [set block above event-block to oak planks if {balance::%player%} is more than or equal to 100]->[subtract 100 from {balance::%player%} if {balance::%player%} is more than or equal to 100]
    --- Double Post Merged, Apr 9, 2019, Original Post Date: Apr 9, 2019 ---
    I tried that it reloads like normal with no errors but when I click the block it does nothing
     
  10. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    Well in that case the condition is probably false
     
  11. OneBigMeatball

    OneBigMeatball New Member

    Joined:
    Apr 8, 2019
    Messages:
    8
    Likes Received:
    0
    It is not but it doesnt matter because I think it only works with tuske
     
  12. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    Yea use TuSKe
     
Thread Status:
Not open for further replies.

Share This Page

Loading...