Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("/ccConfig")
- local config = ccConfig.new("config.cfg", "Multi-Config Example 1")
- local bindings = ccConfig.new("bindings.cfg", "Multi-Config Example 2")
- local running
- local key
- local function loadSettings()
- config:load()
- running = config:getBoolean("canRun", false)
- config:save()
- bindings:load()
- key = bindings:getNumber("doSomething", 200)
- bindings:save()
- end
- loadSettings()
- print("This should display whats in the configs:")
- print("canRun: "..tostring(running)) --> whats in config or false
- print("key binding: "..tostring(key)) --> whats in config or "Hello World"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement