Announcement

Collapse
No announcement yet.

Store common LUA functions in common 'LUA-DLL' ??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Store common LUA functions in common 'LUA-DLL' ??

    Hi,

    I have three autoruns that have some common functions (lua script). Currently the same code is contained in all three autorun Projects. If I make a change in one Project I have to update the other two projects too.
    I want to create a lua library that contains all the common used functions and invoke this from all three autorun projects.
    Is this possible? How can I do this?

    Thanks
    Christian

  • #2
    You could make a module and simply 'require' the file but its perhaps easier just to use Luac to convert your script to byte-code and 'require' it but you can just as easy require the .lua file.

    Comment


    • #3
      Hi,
      thanks for your help!
      Can I create the lua file with a simple Texteditor and Change the fileending to *.lua?
      Can I 'require' more than one *.lua files?
      Do I have something to consider?
      Thanks
      Christian

      Comment


      • #4
        Yes just save the .txt as .lus but if you are just using a .lua you dont need to require it just place it in the 'Scripts' folder and it will load automatically.

        Comment

        Working...
        X