Function is not a text

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

SoPastel

New Member
May 17, 2021
9
2
3
21
Skript Version: 2.6
Server Version: 1.8

When I try to load this skript it gives me the error: 'gui(p: player) is not a text' and I am not sure why.

Code:
Code:
function gui(p: player):
    wait 1 tick
    open chest with 3 rows named "&d&lTest Gui" to {_p}
 
Last edited:
Then this can't be your whole script. Maybe somewhere above you forget to add a " or smth

This is the entire code I have, it works fine without defining the function, but when I define the function it gives me that error.

Code:
function gui(p: player):
    wait 1 tick
    open chest with 3 rows named "&d&lTest Gui" to {_p}

command /achievments [<text>]:
    aliases: /ach, /ac, /aa
    permission: achievments.main
    trigger:
        if arg 1 is not set:
            open chest with 6 rows named "&b&lMain Menu" to player
            set slot 22 of player's current inventory to a diamond named "&b&lTiered Achievments"
            set slot 13 of player's current inventory to a emerald named "&a&lMain Achievments"
 
on inventory click:
    if inventory name of player's current inventory is "&b&lMain Menu":
        cancel event
        if clicked slot is 22:
            send "opened" to player
            gui(player)
 
Status
Not open for further replies.