Posted 01 January 2013 - 03:37 PM
Ok, i'm stumped. I can't find any good tutorials and i can't seem to figure it out, so i'm gonna ask the pros. I'm creating a program that can dig a 3x3 tunnel, but i'm breaking each function into a different program for orginization's sake, i.e: Dig - the digging loop ; Return - return to inventory, etc. So my question is… How do i read tables that i start in one program in another program?
Here's my inital program for the 3x3 (the overall program that i'll run to start the whole digging process):
The code's very much unfinished because i've yet to define the rest of the functions, but you get the idea hopefully.
The help's much appreciated guys. Thanks in advance :)/>
Here's my inital program for the 3x3 (the overall program that i'll run to start the whole digging process):
Spoiler
local t={} --- Table i want to read---
term.clear()
term.setCursorPos(1,1)
print[[3x3 Tunnel Program v1.0
By Mike
]]
term.write("Length of Tunnel? ")
l=tonumber(read())
if l==0 then
print[[
Length must be at least 1
]]
sleep(2)
os.run({}, "tunnel/3x3")
else
print("\nLength of Tunnel: "..l)
table.insert(t,1,l)
print("\nStarting to Dig...")
sleep(1)
os.run({}, "tunnel/Dig")
end
The code's very much unfinished because i've yet to define the rest of the functions, but you get the idea hopefully.
The help's much appreciated guys. Thanks in advance :)/>