Advertisement
Guest User

Obtenir une table, via un require

a guest
Apr 22nd, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.26 KB | None | 0 0
  1. --code dans un script
  2.  
  3. myLibrary = require("./Fonction/function")
  4. list = myLibrary.list
  5.  
  6. --code dans function.lua
  7. local myLibrary={}
  8. list =  {
  9.     { id = 123, lot = 100, min = 6000, price = 0, sale = 0 },
  10.         }
  11.  
  12. -- Return myLibrary on main script
  13. return myLibrary
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement