File creating and setting variables within a file

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

Super

Member
Jun 4, 2017
1
0
0
21
So I'm trying to create a config file for my skript and I used a 1.8 version skript that has its own config file and used the functions from there, but it wont work for 1.11 can someone tell me what addon of skript added those or if they were changed how do I use them now
Thanks :emoji_grinning:

code_language.skript:
function configPopulate(n: number) :: number:
    create file "plugins/HelpCommand/config.yml"
    set "Help1" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help2" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help3" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help4" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help5" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help6" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help7" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help8" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help9" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help10" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help1Text" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help2Text" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help3Text" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help4Text" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help5Text" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help6Text" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help7Text" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help8Text" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help9Text" to "" in yaml file "plugins/HelpCommand/config.yml"
    set "Help10Text" to "" in yaml file "plugins/HelpCommand/config.yml"

code_language.skript:
on load:
    if file "plugins/HelpCommand/config.yml" doesn't exists:
        configPopulate(1)
    else:
        set {HelpCommand.Config.1} to value "Help1" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.2} to value "Help2" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.3} to value "Help3" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.4} to value "Help4" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.5} to value "Help5" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.6} to value "Help6" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.7} to value "Help7" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.8} to value "Help8" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.9} to value "Help9" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.10} to value "Help10" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.Text1} to value "Help1Text" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.Text2} to value "Help2Text" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.Text3} to value "Help3Text" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.Text4} to value "Help4Text" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.Text5} to value "Help5Text" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.Text6} to value "Help6Text" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.Text7} to value "Help7Text" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.Text8} to value "Help8Text" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.Text9} to value "Help9Text" get of "plugins/HelpCommand/config.yml"
        set {HelpCommand.Config.Text10} to value "Help10Text" get of "plugins/HelpCommand/config.yml"
 
Last edited:
Status
Not open for further replies.