LuaToolkit
LuaToolkit copied to clipboard
Support for other type of lua 5.1
I thought you might be interested in adding support for a special type of lua 5.1 files.
These are files from an emulator (NSO) and many of the decompiling tools don't exactly generate a working decompile and break the application. Some files do not even generate code on the decompile.com page, but your decompilicon tool on the web https://lua-decompiler.ferib.dev/ manages to generate data, but with some errors.
Can you bear them? scripts.zip
Hello, the API behind the lua-decompiler.ferib.dev was recently swapped with the luadec 2.2 decompiler as my 'decompiler' was made for educational purposes only. Only after recent increase in traffic I decided to simply ditch my WIP decompiler with an actual working on.
With that said, the luadec v2.2 seems to work perfectly fine on your scripts
Yes, but a large part of those .Lua generates errors. I would like to know if I am using the correct version (5.1) in Luadec or these files are another version.
-- DECOMPILER ERROR at PC

2.2 is the latest version of luadec? I can't find a version reference (which doesn't involve using -v in the console)
I am not familier with luadec at all, but to check your Lua version, open the Lua file in a Hex editor and check for the magic header bytes. Those magic bytes will reveal the correct lua version.
Having a quick look at the files in notepad will reveal the string LuaQ at the start, the Q is 0x51 in hex, assuming this is indeed Lua version 5.1
Ok so your website uses luadec v2.2 (luadec 2.2 rev: 895d923 for Lua 5.1) which I compiled from viruscamp/luadec and got the same result
Maybe I should send the request to the original repository to verify why it does not read these .lua correctly
Sorry, I thought you knew more about Luadec, and could you help me to know how to get that missing information where the comments appear in the decompiled file.