Creating kits and storing them in a file + Umbaska not working!

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

Cherrie

Member
Jan 28, 2017
3
0
0
25
Pyongyang, North Korea
Hi, first of all, I'm trying to code a skipt where the player would do /createkit <name> and it'd STORE those details in a document and add it to a GUI as a FORMATTED ITEM.

Code so far:

code_language.skript:
on load:
    if folder "plugins/skript/xKits/" doesn't exists:
        create folder "plugins/skript/xKits/"
    if file "plugins/skript/xKits/config.yml" doesn't exists:
        create file "plugins/skript/xKits/config.yml"

command /createkit [<text>]:
    description: Create a kit corresponding to what you called it.
    usage: /createkit [<name>]
    trigger:
        if arg 1 is set:
            send "%arg 1%"
           
command /kits:
    description: Displays all kits.
    usage: kits
    trigger:
        open chest with 3 rows named "Kits" to player
        format slot 0 of player with LIGHT GREEN DYE named "&aPage 1" to be unstealable

I've got Umbaska and I'm getting the following errors when reloading my sk file.
code_language.skript:
folder "plugins/skript/xKits/" doesn't' is not an entity type

I cannot do this at all until I get Umbaska working!!

Thanks!
 
code_language.skript:
if folder "plugins/skript/xKits/" doesn't exists:
        create folder "plugins/skript/xKits/"


By using these lines you already check if the folder is created or not:
code_language.skript:
if file "plugins/skript/xKits/config.yml" doesn't exists:

Folder does not exist -> folder + file will be created.
Folder exists, but file does not -> file will be created.
 
Status
Not open for further replies.