Settings.lua problem[0.17.x] SOLVED

Place to get help with not working mods / modding interface.
Tunasz
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Jul 24, 2019 6:41 pm
Contact:

Settings.lua problem[0.17.x] SOLVED

Post by Tunasz »

Hello everyone!

I am working on my mod and I want to add a settings into it, but I get a bug.
"No loader found for "bool-setting" ".
I tried to copy the tutorial's code into settings.lua, I tried other mods codes, but I got this bug every time.
Now this is how the files looks like.
Data.lua

Code: Select all

require("prototype.settings")
require("prototype.item-groups")
require("prototype.item")
require("prototype.entity")
require("prototype.recipe")
require("prototype.control")
settings.lua

Code: Select all

require("prototype.options-panel")
options-panel.lua

Code: Select all

data:extend({
    {
        type = "bool-setting",
        name = "wartorio-maximum-number-robots-both",
        setting_type = "runtime-global",
        order="a",
        default_value = true
    },
    {
        type = "int-setting",
        name = "wartorio-maximum-number-robots",
        setting_type = "runtime-global",
        order="b",
        minimum_value = 0,
        maximum_value = 1000,
        default_value = 100
    },
    {
        type = "int-setting",
        name = "wartorio-maximum-number-robots-iron",
        setting_type = "runtime-global",
        minimum_value = 0,
        order="c",
        maximum_value = 1000,
        default_value = 0
    },
    {
        type = "int-setting",
        name = "wartorio-maximum-number-robots-copper",
        setting_type = "runtime-global",
        order="d",
        minimum_value = 0,
        maximum_value = 1000,
        default_value = 0
    }
})
Do I need to put extra code into other places or do I missed something?
I would be glad if someone could help!
Last edited by Tunasz on Tue Sep 17, 2019 9:57 am, edited 1 time in total.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Settings.lua problem[0.17.x]

Post by eradicator »

Tunasz wrote: Mon Sep 16, 2019 6:21 pm options-panel.lua

Code: Select all

data:extend({
    {
        type = "bool-setting",
        name = "wartorio-maximum-number-robots-both",
        setting_type = "runtime-global",
        order="a",
        default_value = true
    },
    {
        type = "int-setting",
        name = "wartorio-maximum-number-robots",
        setting_type = "runtime-global",
        order="b",
        minimum_value = 0,
        maximum_value = 1000,
        default_value = 100
    },
    {
        type = "int-setting",
        name = "wartorio-maximum-number-robots-iron",
        setting_type = "runtime-global",
        minimum_value = 0,
        order="c",
        maximum_value = 1000,
        default_value = 0
    },
    {
        type = "int-setting",
        name = "wartorio-maximum-number-robots-copper",
        setting_type = "runtime-global",
        order="d",
        minimum_value = 0,
        maximum_value = 1000,
        default_value = 0
    }
})
That works just fine if i copy/paste it into my own settings.lua. So your bug must be somewhere else.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Settings.lua problem[0.17.x]

Post by Bilka »

Don't require the settings in the data stage.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Tunasz
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Jul 24, 2019 6:41 pm
Contact:

Re: Settings.lua problem[0.17.x]

Post by Tunasz »

Ok I put it into settings.lua, but this no loader for bool-setting issue only appeared, when I put in the settings.lua with some code and this was the last thing that I implemented.
Could the version cause this?
The other things what I have is entities, items, recipes and the local.
But only the local has something to do with the settings.lua.
Tunasz
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Jul 24, 2019 6:41 pm
Contact:

Re: Settings.lua problem[0.17.x]

Post by Tunasz »

SOLVED.
I had 2 problems which caused the error.
1. I had the data.lua request the settings.
2. I had the setting.lua inside the prototypes file.
Post Reply

Return to “Modding help”