Advertisement
Pirnogion

config

Aug 4th, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. local fs = require "filesystem"
  2. local json = require "json"
  3.  
  4. local configData = nil
  5.  
  6. --CONFIG API--
  7. local config = {}
  8.  
  9. function config:loadConfig(file_path)
  10.     local file = fs.open(file_path, "r")
  11.  
  12.     configData = json:decode( file:read() )
  13.  
  14.     file:close()
  15.  
  16.     io.write(configData)
  17. end
  18.  
  19. function config:saveConfig(file_path)
  20.    
  21. end
  22.  
  23. function config:set(config, key, value)
  24.     print("SET!")
  25. end
  26.  
  27. function config:get(config, key, value)
  28.    
  29. end
  30.  
  31. return config
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement