Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tArgs = { ... }
- if peripheral.find("Create_Station") then
- trainstation=peripheral.find("Create_Station")
- else
- print("no trainstation found")
- return
- end
- if #tArgs <= 0 then
- print("missing Arguments")
- print("usage: trainstation assemble/disassemble")
- return
- elseif #tArgs > 1 then
- print("to much arguments. checking only the first")
- end
- if tArgs[1] == "assemble" then
- print("trying to assemble train")
- if trainstation.assemble() then
- print("success")
- else
- print("error")
- end
- elseif tArgs[1] == "disassemble" then
- print("trying to disassemble train")
- if trainstation.disassemble() then
- print("success")
- else
- print("error")
- end
- elseif tArgs[1] == "setAssemblyMode" then
- print("trying to enter Assembly Mode")
- if trainstation.setAssemblyMode() then
- print("success")
- else
- print("error")
- end
- else
- print("command not found")
- print("command: "..tArgs[1])
- end
Advertisement
Add Comment
Please, Sign In to add comment