Posted 29 June 2015 - 08:48 PM
Hi All! Im Trying To Make A Copy Function With An Infinite Table.
Code:
Also, If I Unpack it Like This:
Anyone Know How To Fix This?
Code:
x = 1
function input()
inp = {}
loop = true
while loop == true do
inp[x] = read()
tostring(inp[x])
x = x + 1
loop = false
end
end
term.write("Copy Which File?: ")
--input1 = read()
input()
term.write("To Where: ")
--input2 = read()
input()
fs.copy(inp[1], inp[2])
If I Do This Then I Get The Error, "Expected string, string"Also, If I Unpack it Like This:
x = 1
function input()
inp = {}
loop = true
while loop == true do
inp[x] = read()
tostring(inp[x])
x = x + 1
loop = false
end
end
term.write("Copy Which File?: ")
--input1 = read()
input()
term.write("To Where: ")
--input2 = read()
input()
fs.copy(unpack(inp[1]), unpack(inp[2]))
I Get The Error "bad arguement: table expected, got nil"Anyone Know How To Fix This?