edison12344
Contributors
Target Mission: Help Gamers
Posts: 142
|
Post by edison12344 on Apr 30, 2018 13:42:12 GMT
I've try dofile("Inventory.lua") and
require "Inventory"
with no luck still module not found
I just want to create clean code by dissecting parts of the bots.
Edit: I found the solution.
you have to include the full path where your captured_images is located (e.g. sdcard/AnkuLua/captured_images/Inventory.lua)
This is for future reference of other programmers.
Final: dofile(scriptPath().."Inventory.lua")
|
|
|
Post by Acera Dryd on Apr 30, 2018 14:24:14 GMT
This is a really bad way, because every user use the script in a different path. A better way is to use this code:
dofile(scriptPath() .. "Inventory.lua") or
require(scriptPath() .. "Inventory.lua")
|
|
|
Post by Mercobots on Apr 30, 2018 14:25:49 GMT
hi there i think this is what are you looking for scriptPath()dofile(scriptPath() .. "Inventory.lua") the major diference is when you share the script
|
|
|
Post by Mercobots on Apr 30, 2018 14:26:39 GMT
|
|
edison12344
Contributors
Target Mission: Help Gamers
Posts: 142
|
Post by edison12344 on Apr 30, 2018 14:39:16 GMT
This is a really bad way, because every user use the script in a different path. A better way is to use this code: dofile(scriptPath() .. "Inventory.lua") or require(scriptPath() .. "Inventory.lua") ok noted thank you.
|
|