• gm_clua
    49 replies, posted
As test I tried to run this code as compiled... [lua]print("loltest")[/lua] ...it wouldn't work well... [code]lua\compiled.lua: unexpected end in precompiled chunk[/code]
Worked perfectly fine for me. Post the exact steps you took.
1. Created a txt file on D: 2. Renamed it to test.lua 3. Wrote print("loltest") and saved 4. Opened cmd and went to D: 5. Moved clua.exe to D: 6. Ran clua.exe -s test.lua(no errors) 7. Copied the result(compiled.lua) to /lua/ 8. Copied gm_clua.dll to lua/includes/modules/ 9. Ran gmod and ran lua_run_cl require("clua") 10. ran lua_openscript_cl compiled.lua Exact enough?
Yes, exact enough. This doesn't change lua_openscript_cl. Try lua_run_cl runclua('compiled.lua')
[QUOTE=yakahughes;27213888]Yes, exact enough. This doesn't change lua_openscript_cl. Try lua_run_cl runclua('compiled.lua')[/QUOTE] Oooh my bad I didn't notice that it has a own function.
Hey, the link to the binary module is down. Can you please reupload / fix the link? Thanks :D
I've had it with solidfiles, I won't use them any more. That's the second time they've randomly removed that file from my account. The link is fixed.
Thanks :D And by the way the first two links that say "here" on them are down also. I can't seem to find the exact luaC program that I should use for this module. If you could fix them, that would be great. :3
Unbelievable. gm_preproc.dll was also removed. Anyway, fixed those two links.
I'm done with compiling all my stuff, now stupid servers can't download my shit anymore (file.Read does not support binary) :v: Would you consider making the function able to read .clua files too, I'ld like to have that. NVM recompiled it myself.
The lua compiler doesn't accept continue keyword...
[QUOTE=Athos;27353758]The lua compiler doesn't accept continue keyword...[/QUOTE] Obviously. continue is gmod specific, an addition by garry. If he told someone how he did it, they could add it to luac.
I thought it was a patch... [url]http://lua-users.org/lists/lua-l/2009-06/msg00331.html[/url]
[QUOTE=Athos;27355397]I thought it was a patch... [url]http://lua-users.org/lists/lua-l/2009-06/msg00331.html[/url][/QUOTE] That may be it, I just assumed garry wrote it. I don't know how to apply it though, and don't really have the time to figure it out.
If you compile lua with the -s flag does it make it completely impossible to decompile and get original source, or does it just make it a huge pain in the ass?
Sorry to bump this thread, but this doesn't make any sense: [code]] lua_run_cl runclua("falcoprivate/11antilag.lua") Not running file falcoprivate/11antilag.lua (invalid path) ] lua_run_cl include("falcoprivate/11antilag.lua") addons\falco's small scripts\lua\falcoprivate\11antilag.lua: unexpected end in precompiled chunk [/code] The include shows that the file exists, while the runclua function says it's an invalid path.
[QUOTE=FPtje;29985950]Sorry to bump this thread, but this doesn't make any sense: [code]] lua_run_cl runclua("falcoprivate/11antilag.lua") Not running file falcoprivate/11antilag.lua (invalid path) ] lua_run_cl include("falcoprivate/11antilag.lua") addons\falco's small scripts\lua\falcoprivate\11antilag.lua: unexpected end in precompiled chunk [/code] The include shows that the file exists, while the runclua function says it's an invalid path.[/QUOTE] It only seems to load files in garrysmod/lua, not inside addons, since the module doesn't use Source's filesystem API.
I just saw it, thanks though.
Does this still work? And what parts don't work?
It does.
Sorry, you need to Log In to post a reply to this thread.