lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> However, when an error occurs in that file (after loading it later),
> it points to the original filename. This, I understand, but I would
> like to change this somehow.

You can read the whole file into memory and then compile it with loadstring
giving a name of your choosing: loadstring(string, chunkname).

> What I'm actually after, is the path always starting at the same byte
> and is it using MAX_PATH space or is the length of the path defined
> elsewhere?

The length is given as an int before the actual string. You need to
know the endianess replace this correctly. But the above solution is
much cleaner.