SHARE
TWEET

Obtenir une table, via un require

a guest Apr 22nd, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top