added a usage text to exportcomponent

This commit is contained in:
Izaya 2019-12-25 16:50:52 +11:00
parent f7cc00822a
commit f896547ea9
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,10 @@ local component = require "component"
local rpc = require "rpc"
local tA = {...}
if #tA < 1 then
print("Usage: exportcomponent <component address> [component address...]")
end
for k,v in ipairs(tA) do
local px = component.proxy(component.get(v))
print(px.type.."_"..px.address)