why doesn't this work ("on rightclick on enchanting table" is error)

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

iFlyi

Member
Jun 28, 2020
1
0
0
23
on rightclick on enchanting table:
cancel event
set the player's level to {player.level}
open chest with 5 rows named "&6&lEnchanting Table" to player
format slot 0 of player with light blue stained glass named "" to be unstealable
format slot 1 of player with light blue stained glass named "" to be unstealable
format slot 2 of player with light blue stained glass named "" to be unstealable
format slot 3 of player with diamond named "&b%player%: %{player.level}% exp" to be unstealable
format slot 4 of player with light blue stained glass named "" to be unstealable
format slot 5 of player with light blue stained glass named "" to be unstealable
format slot 6 of player with light blue stained glass named "" to be unstealable
format slot 7 of player with light blue stained glass named "" to be unstealable
format slot 8 of player with light blue stained glass named "" to be unstealable
 
Code:
#NOTE
#when you end a line off with a colon you must indent the next line
#example:
#
#on rightclick on stick:
#    send "It Works!"        

on rightclick on enchanting table:
    cancel event
    set the player's level to {player.level}
    open chest with 5 rows named "&6&lEnchanting Table" to player
    format slot 0 of player with light blue stained glass named "" to be unstealable
    format slot 1 of player with light blue stained glass named "" to be unstealable
    format slot 2 of player with light blue stained glass named "" to be unstealable
    format slot 3 of player with diamond named "&b%player%: %{player.level}% exp" to be unstealable
    format slot 4 of player with light blue stained glass named "" to be unstealable
    format slot 5 of player with light blue stained glass named "" to be unstealable
    format slot 6 of player with light blue stained glass named "" to be unstealable
    format slot 7 of player with light blue stained glass named "" to be unstealable
    format slot 8 of player with light blue stained glass named "" to be unstealable
 
Just a few things removed and this works
Code:
on rightclick on enchanting table:
    cancel event
    open chest with 5 rows named "&6&lEnchanting Table" to player
    wait 5 ticks       #wait may not be needed but I include waits in chest guis
    format slot 0 of player with light blue stained glass named "" to be unstealable
    format slot 1 of player with light blue stained glass named "" to be unstealable
    format slot 2 of player with light blue stained glass named "" to be unstealable
    format slot 3 of player with diamond named "&b%player%: %player's level% exp" to be unstealable
    format slot 4 of player with light blue stained glass named "" to be unstealable
    format slot 5 of player with light blue stained glass named "" to be unstealable
    format slot 6 of player with light blue stained glass named "" to be unstealable
    format slot 7 of player with light blue stained glass named "" to be unstealable
    format slot 8 of player with light blue stained glass named "" to be unstealable
 
Status
Not open for further replies.