Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. local component = require('component')
  2. altar = component.proxy(component.bloodmagic_altar.address)
  3. config = {}
  4.  
  5. function loadConfig()
  6. print('Loading config from '..configPath)
  7. local f, err = io.open(configPath, 'r')
  8. if not f then
  9. -- usually the file does not exist, on the first run
  10. print('Loading failed:', err)
  11. return
  12. end
  13.  
  14. config = serialization.unserialize(f:read('a'))
  15.  
  16. f:close()
  17. print('Loaded '..#config.recipes..' recipes')
  18. end
  19.  
  20. function main()
  21. loadConfig()
  22. print("hi")
  23. end
  24.  
  25.  
  26. --
  27. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement