local file = love.filesystem.read("a.bin")
local s = love.data.unpack("I4", file, 5)
-- is any difference between above and below?
local file = love.filesystem.newFile("a.bin")
file:open("r")
file:seek(4)
local s = love.data.unpack("I4", file:read(4))
-- err: data string too short
local s = love.data.unpack("I4", file:read())
-- err: data string too short
Last edited by abyssol on Wed Jan 31, 2024 10:40 pm, edited 2 times in total.