daily pastebin goal
17%
SHARE
TWEET

Untitled

a guest Jun 26th, 2013 28 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local read_s16 = function(file)
  2.         return string.byte(file:read(1)) * 256 + string.byte(file:read(1))
  3. end
  4.  
  5. function get_decorationschemsize(f)
  6.         if f:read(4) ~= "MTSM" then error("foobar") end
  7.         f:read(2)
  8.         return read_s16(f), read_s16(f), read_s16(f)
  9. end
  10.  
  11. fi = io.open("schematic.mts", 'rb')
  12. x, y, z = get_decorationschemsize(fi)
  13. fi.close()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top