Depending to what is you API.lua contains, but here is the simple way:
Code:
--- Load Table / File Lua Store in CE Table
function loadTableCode(n)
local t = findTableFile(n)
if t ~= nil then
local s = t.Stream
local c = readStringLocal(s.Memory,s.Size)
return c ~= nil and loadstring(c)
end
end
-- usage example
test = loadTableCode('API.lua')
print(type(test))
if type(test) == 'function' then test() else print('not loaded') end
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum