Logic Machine Forum
Can logic machine run luac (lua complier) file? - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Can logic machine run luac (lua complier) file? (/showthread.php?tid=3471)



Can logic machine run luac (lua complier) file? - pouralise - 14.07.2021

I have 2 question:

- Can logic machine run luac (lua complier) file?
- Can I encrypt my script in scripting section so it can still be run normally but other people can't understand my code.

Thank you


RE: Can logic machine run luac (lua complier) file? - admin - 14.07.2021

LM uses LuaJIT not standard Lua. The easiest way to hide your code is to create a user library with your own functions and disable "keep source" option. Then you can include this library in your scripts and call the required functions. Something like this:
Code:
require('user.mylibrary')
myfunction()



RE: Can logic machine run luac (lua complier) file? - FatMax - 29.09.2022

Reviving this thread.

We wan't to install a user library when an app opens for the first time (if it is not already created). Is there a way to create a user library, copy over the code and convert to byte code (or perhaps just change keep code to false) so that it works with the app? Or is it possible to just keep the code in the app folder and convert that to byte code?