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.

Invalid Book Tag

Discussion in 'Skript' started by _iz_, Feb 4, 2021.

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

    _iz_ New Member

    Joined:
    Jan 8, 2021
    Messages:
    5
    Likes Received:
    0
    So I'm using Skellett to try and make custom books, and every time I try to open it, it displays as "*Invalid Book Tag*". I've tried adding pages and it gives me errors. Here's my code:


    Code (Text):
    1. options:
    2.     noperm: &4You do not have access to this command.
    3.  
    4. command /testviewpun <text>:
    5.     permission: *
    6.     permission message: {@noperm}
    7.     usage: Usage: /testviewpun <code>
    8.     trigger:
    9.         set {_book} to a new written book
    10.         set {_book}'s book title to "Punishments"
    11.         wait 1 tick
    12.         add page "Test 1" to {_book}
    13.         set {_back} to a new text component with text "&4[BACK]"
    14.         add hover event with action SHOW_TEXT with text "&cClick to view punishment list" to text component {_back}
    15.         add click event with action RUN_COMMAND with execute "/puns %{_p}%" to text component {_back}
    16.         add text component {_back} to {_book}
    17.         open book {_book} to player
    Any help would be appreciated!
     
  2. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    I know im answering you late, but I had the same problem and my way to solve it was this:
    (I replaced my code by your code)
    Code (Skript):
    1. options:
    2.     noperm: &4You do not have access to this command.
    3.  
    4. command /testviewpun <text>:
    5.     permission: *
    6.     permission message: {@noperm}
    7.     usage: Usage: /testviewpun <code>
    8.     trigger:
    9.         set {_book} to a new written book
    10.         set {_meta} to {_book}.getItemData()
    11.         {_meta}.setTitle("Blank")
    12.         {_meta}.setAuthor("Server")
    13.         {_book}.setItemMeta({_meta})
    14.         wait 1 tick
    15.         set {_back} to a new text component with text "&4[BACK]"
    16.         add hover event with action SHOW_TEXT with text "&cClick to view punishment list" to text component {_back}
    17.         add click event with action RUN_COMMAND with execute "/puns %{_p}%" to text component {_back}
    18.         add text component {_back} to {_book}
    19.         open book {_book} to player
     
Thread Status:
Not open for further replies.

Share This Page

Loading...