nomnuggetnom

Stack Divider

Aug 20th, 2013
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.28 KB | None | 0 0
  1. local tArgs = {...}
  2. for a,b in pairs (tArgs) do
  3.     numberInput = b
  4. end
  5.  
  6. stackNumber = math.floor(numberInput/64)
  7. remainder = numberInput - (stackNumber*64)
  8.  
  9. solution = "You'll need " ..tostring(stackNumber).. " stack(s) and " ..tostring(remainder).. " extra."
  10. term.write(solution)
Advertisement
Add Comment
Please, Sign In to add comment