This does work, but the files that come out aren't valid dds files.hhrhhr wrote:use "<I4" instead of "<L".
> I[n]: an unsigned int with n bytes (default is native size)
edit---
Ahh, needed to change <L below too.
This does work, but the files that come out aren't valid dds files.hhrhhr wrote:use "<I4" instead of "<L".
> I[n]: an unsigned int with n bytes (default is native size)
Ahh, that seems to have done the trick!hhrhhr wrote:use "<I4" instead of "<L".
> I[n]: an unsigned int with n bytes (default is native size)
Well, it even fails on their demo page.hhrhhr wrote:I can only advise to try all conversion options from here (http://www.lua.org/manual/5.3/manual.html#6.4.2) with string "DXT1", for example, find inoperative and inform maintainer of lua package.
That works.hhrhhr wrote:"<L " means "native sized little endian unsigned long". maybe you are using a big endian or/and 16-bit platform?
let's try one byte:Code: Select all
lua -e "print(string.unpack('B', '\xFF')) 255 2
Odd, I have 5.3 installed. I get the same error with your test.hhrhhr wrote:I think that you are using the wrong Lua. try to test:Code: Select all
> lua -e "print(_VERSION)" Lua 5.3 > lua -e "print(string.unpack('<L', '\xD2\x02\x96\x49'))" 1234567890 5
lua ./unpack_textures.lua texture.cache unpackhhrhhr wrote:full command line?designgears wrote:Getting an error when I try to unpack.