Posted 14 March 2013 - 07:38 AM
Hi! I ran into this problem, which show an example:
loader.lua:
local api = {};
api.ololoFunc = function() {
term.write("hello");
}
local func = loadfile("ololo.lua");
– function to add object named "api" into file
local cor = coroutine.create(func);
coroutine.resume(cor);
ololo.lua:
api:ololoFunc();
What I need to write instead "– function to add object named "api" into file"
Sorry for my bad English
loader.lua:
local api = {};
api.ololoFunc = function() {
term.write("hello");
}
local func = loadfile("ololo.lua");
– function to add object named "api" into file
local cor = coroutine.create(func);
coroutine.resume(cor);
ololo.lua:
api:ololoFunc();
What I need to write instead "– function to add object named "api" into file"
Sorry for my bad English