3 posts
Posted 30 March 2012 - 03:01 PM
Hi. I'm doing Nazi Zombies map using ComputerCraft abilities and i need help with startup program that runs monitor with arguments right and packapunch (For those who want to know. This checks if the power is on and opens packapunch machine)
53 posts
Posted 30 March 2012 - 03:40 PM
local args = {...}
local right,packapunch
if #args > 2 or #args < 2 then print("Invalid number of arguments.")
else
right,packapunch = args[1],args[2]
end
454 posts
Location
London
Posted 30 March 2012 - 04:20 PM
Hi. I'm doing Nazi Zombies map using ComputerCraft abilities and i need help with startup program that runs monitor with arguments right and packapunch (For those who want to know. This checks if the power is on and opens packapunch machine)
local args = {...}
local right,packapunch
if #args > 2 or #args < 2 then print("Invalid number of arguments.")
else
right,packapunch = args[1],args[2]
end
You might want to read the OP (again).
You can use shell.run:
shell.run("path/to/program", arg1, arg2, ...)