AndyE7

Elevator floor update

Jul 11th, 2023
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. local tArgs = {...}
  2.  
  3. local numOfFloors
  4.  
  5. if #tArgs ~= 1 then
  6. print("Required number of floors as an argument")
  7. return
  8. end
  9.  
  10. numOfFloors = tArgs[1]
  11.  
  12. local file = fs.open("numOfFloors", "w")
  13. file.write(textutils.serialize(numOfFloors))
  14. file.close()
  15.  
  16. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment