RealWanteD Posted March 5, 2022 Posted March 5, 2022 The title say it, how can I put the generated .lua file into script? Or, is there a command to call a lua file to execute from my main script Like function test() exec(/sdcard/targetd_script.lua) gg.editAll("-2") end
MAARS Posted March 6, 2022 Posted March 6, 2022 There are many ways to link lua file, using module or the function loadfile, i have made some example in the archives for you examples.zip
RealWanteD Posted March 6, 2022 Author Posted March 6, 2022 9 minutes ago, MAARS said: There are many ways to link lua file, using module or the function loadfile, i have made some example in the archives for you Thank you, I'll test it rn
RealWanteD Posted March 6, 2022 Author Posted March 6, 2022 The targeted file is loaded and running But it doesn't edit any values InShot_20220306_041602488.mp4 test_loadlist.lua
RealWanteD Posted March 6, 2022 Author Posted March 6, 2022 4 minutes ago, xWanted said: InShot_20220306_041602488.mp4 You can see the chainer script is working fine, I got the value from first run
MAARS Posted March 6, 2022 Posted March 6, 2022 You need to call the variable externaleFile like a function local externaleFile = loadfile('/storage/emulated/0/test.lua"') externaleFile() when you load file it does not execute it it just load the file into the variable so you can use it at anytime by calling it like a function
RealWanteD Posted March 6, 2022 Author Posted March 6, 2022 1 hour ago, MAARS said: You need to call the variable externaleFile like a function local externaleFile = loadfile('/storage/emulated/0/test.lua"') externaleFile() when you load file it does not execute it it just load the file into the variable so you can use it at anytime by calling it like a function Thank you bro, now it's working as I wanted UpVote for sure
Question
RealWanteD
The title say it, how can I put the generated .lua file into script?
Or, is there a command to call a lua file to execute from my main script
Like
function test()
exec(/sdcard/targetd_script.lua)
gg.editAll("-2")
end
6 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.