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 station found")
- return
- end
- if #tArgs <= 0 then
- print("usage: stationname get/set new")
- return
- end
- action = tArgs[1]
- if action == "set" then
- new = tArgs[2]
- trainstation.setStationName(new)
- print("new Station Name: "..trainstation.getStationName())
- sleep(0.1)
- trainstation.setStationName(new)
- elseif action == "get" then
- print(trainstation.getStationName())
- else
- print("unknown action")
- print("usage: stationname get/set new")
- end
Advertisement
Add Comment
Please, Sign In to add comment