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.

on rightclick on sign

Discussion in 'Skript' started by Carlo Verhamme, Sep 9, 2018.

Thread Status:
Not open for further replies.
  1. Carlo Verhamme

    Carlo Verhamme New Member

    Joined:
    Jul 28, 2017
    Messages:
    5
    Likes Received:
    0
    So I am making so when you click on a sign it opens a gui for you.
    This is my current code:

    Code (Skript):
    1. on right click on sign:
    2.     1st line of clicked block is "&0[&5TreinTickets&0]"
    3.     open chest with 3 rows named "{@menu-naam}" to player
    4.     wait 1 tick
    5.     set {_slot} to 0
    6.     loop 28 times:
    7.         format slot {_slot} of player with 160:5
    8.         add 1 to {_slot}
    9.     format slot 13 of player with paper named "&5Trein Ticket" with lore "&7Klik op mij om een trein ticket te krijgen!" to close then run [execute console command "/giveticket %player%"]
    This is the error I get:
    Code (Skript):
    1. [12:51:37 ERROR]: 'player with 160:5' is not an item stack (ticketsysteem.sk, line 15: format slot {_slot} of player with 160:5')
    and when I click the sign. Nothing happens
     
  2. hakanb16

    hakanb16 Member

    Joined:
    Feb 15, 2017
    Messages:
    4
    Likes Received:
    0
    I know the solution there is a java bug sign's first charter seems white on java and you must write after 160:5 to be unstealable, here is correct code:

    Code (Skript):
    1. on right click on sign:
    2.     1st line of clicked block is "[&5TreinTickets&0]"
    3.     open chest with 3 rows named "{@menu-naam}" to player
    4.     wait 1 tick
    5.     loop 27 times:
    6.         format slot loop-number - 1 of player with 160:5 to be unstealable
    7.     format slot 13 of player with paper named "&5Trein Ticket" with lore "&7Klik op mij om een trein ticket te krijgen!" to close then run [execute console command "/giveticket %player%"]
     
Thread Status:
Not open for further replies.

Share This Page

Loading...