#invalid book tag

1 messages · Page 1 of 1 (latest)

novel lynx
#

Hi, I'm new to scripts and ran into a little problem today. Basically every time I try to generate a book from a script, the words: "invalid book tag" appear inside the book. How to resolve?

forest scaffold
novel lynx
# forest scaffold <:send_code:688375650582790339>

command /libro [<string>] [<string>] [<player>]: aliases: /libri, /doc, /libro cooldown: 5 seconds trigger: if arg-1 isn't set: libroInfo(player) else if arg-1 is "rifornimento": if player has permission "{@perm_rifornimenti}": if arg-2 is set: send "&aHai compilato un modulo rifornimento %arg-1%" set {_b} to a written book set {_t} to text component of "&7&l----------------%nl%%nl%&8&lModulo Rifornim.%nl%%nl%&7&l----------------%nl%%nl%&7Agente: &0%player%%nl%%nl%&7Richiesta: &0%arg-2%" set page 1 of book {_b} to {_t} set book author of {_b} to "%player%" set book title of {_b} to "&aM. Rifornimento" add 1 of {_b} to player's inventory else: send "&cInserisc l'oggetto che vuoi richiedere come rifornimento" to player else: send "&cNon hai il permesso per eseguire questo comando" to player

forest scaffold
#

I suggest you to try something a bit different..

set {_component} to a new text component with "&7&l----------------%nl%%nl%&8&lModulo Rifornim.%nl%%nl%&7&l----------------%nl%%nl%&7Agente: &0%player%%nl%%nl%&7Richiesta: &0%arg-2%"
set book author of {_b} to "%player%"
add text component {_component} to book {_b}
give player 1 of {_b}```
forest scaffold
#

wow that’s so helpful

#

And send addons

novel lynx
#

what?

forest scaffold
#

send errors and send addons

novel lynx
#

these are the errors

#

what are addons, is there a document or manual where I can understand?

#

sorry.. i'm new to skripts

novel lynx
#

yes

verbal compass
#

we

novel lynx
#

ciaoo

verbal compass
#

zaoo

forest scaffold
#

huh your code is entirely broken due to mixing tabs and spaces, send me whole command code and I will reformat it

novel lynx
#

command /libro [<string>] [<string>] [<player>]: aliases: /libri, /doc, /libro cooldown: 2 seconds trigger: if arg-1 is "magazzino": set {_b} to a new book set {_component} to a new text component with "&7&l----------------%nl%%nl%&8&lModulo Rifornim.%nl%%nl%&7&l----------------%nl%%nl%&7Agente: &0%player%%nl%%nl%&7Richiesta: &0%arg-2%" set book author of {_b} to "%player%" add text component {_component} to book {_b} give player 1 of {_b} else if arg-1 is "prescrizione": if player has permission "{@perm_ospedale}": if arg-2 is set: if arg-3 is set: send "&aHai prescritto %arg-2% a %arg-3%" set {_b} to a written book set {_t} to text component of "&7&l----------------%nl%%nl%&c&lPrescrizione%nl%%nl%&7&l----------------%nl%%nl%&cMedico: &0%player%%nl%%nl%&cFarmaco: &0%arg-2%%nl%%nl%&bCittadino: &0%arg-3%" set page 1 of book {_b} to {_t} set book author of {_b} to "%player%" set book title of {_b} to "&aM. Rifornimento %arg-2%" add 1 of {_b} to player's inventory else: send "&cInserisci il cittadino a cui vuoi scrivere la prescrizione" to player else: send "&cInserisci il farmaco da prescrivere" to player else: send "&cNon hai il permesso per eseguire questo comando" to player

forest scaffold
#
    aliases: /libri, /doc, /libro
    cooldown: 2 seconds
    trigger:
        if arg-1 is "magazzino":
            set {_b} to a new book
            set {_component} to a new text component with "&7&l----------------%nl%%nl%&8&lModulo Rifornim.%nl%%nl%&7&l----------------%nl%%nl%&7Agente: &0%player%%nl%%nl%&7Richiesta: &0%arg-2%"
            set book author of {_b} to "%player%"
            add text component {_component} to book {_b}
            give player 1 of {_b}
        else:
            if arg-1 is "prescrizione":
                if player has permission "{@perm_ospedale}":
                    if arg-2 is set:
                        if arg-3 is set:
                            send "&aHai prescritto %arg-2% a %arg-3%"
                            set {_b} to a new book
                            set {_t} to text component of "&7&l----------------%nl%%nl%&c&lPrescrizione%nl%%nl%&7&l----------------%nl%%nl%&cMedico: &0%player%%nl%%nl%&cFarmaco: &0%arg-2%%nl%%nl%&bCittadino: &0%arg-3%"
                            add {_t} to book {_b}
                            set book author of {_b} to "%player%"
                            set book title of {_b} to "&aM. Rifornimento %arg-2%"
                            give player 1 of {_b}
                        else:
                            send "&cInserisci il cittadino a cui vuoi scrivere la prescrizione" to player
                    else:
                        send "&cInserisci il farmaco da prescrivere" to player
                else:
                    send "&cNon hai il permesso per eseguire questo comando" to player```
novel lynx
#

problem solved, thanks