Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use the module #7

Closed
DBotThePony opened this issue Aug 16, 2020 · 7 comments
Closed

Can't use the module #7

DBotThePony opened this issue Aug 16, 2020 · 7 comments
Assignees

Comments

@DBotThePony
Copy link

I've compiled it by myself for Linux and can't get it to work.

I tried to compile it for 32-bit target with master branch garrysmod_common and on startup server throw an error failed to hook GModDataPack::AddOrUpdateFile (on stable gmod branch of course)

Then i tried to compile it for 64-bit target with x86-64-support-sourcesdk branch on garrysmod_common and it fails on compilation:
putty_kscsV7ePSW

Removing last true argument from call make it compile, but on server startup when it need to load the module it instantly segaults.

@michak89
Copy link

michak89 commented Aug 16, 2020 via email

@danielga danielga self-assigned this Aug 16, 2020
@danielga
Copy link
Owner

Can you try these builds please?

@michak89
Copy link

michak89 commented Aug 17, 2020

Those are clean server files, downloaded today, windows:
gmsv_luapack_internal_win32.dll build from above.
gmsv_crypt_win32.dll - old but should work propertly.
Luapack code is up to date.
Stock send.txt file renamed to _send.txt
Stock lua/includes/init,lua renamed to _init.lua
Luapack folder located in lua folder.
Init.lua located in lua/includes.

Looks like .dll does work but can't get it running, little video here, 1 minute:
(something interesting will happen with init.lua)
https://youtu.be/pqI2RzK813E

Error screenshot here:
image

🌵

@danielga
Copy link
Owner

danielga commented Aug 17, 2020

By luapack folder, do you mean this? Because that is meant to go into addons. Otherwise, I'm unable to reproduce the issue.

@michak89
Copy link

michak89 commented Aug 17, 2020

I just commented this few hours ago:

--[[
if file.Exists("lua/includes/init.lua", "MOD") and not luapack.Rename("includes/init.lua", "includes/_init.lua", "MOD") then
luapack.DebugMsg("Failed to rename init.lua to _init.lua (maybe 'lua/includes/_init.lua' already exists?)")
end

if file.Exists("lua/send.txt", "MOD") and not luapack.Rename("send.txt", "_send.txt", "MOD") then
luapack.DebugMsg("Failed to rename send.txt to _send.txt (maybe 'lua/_send.txt' already exists?)")
end
--]]
its a bit modified, I tried few things. Anyway, now it works:
image
Pack is successfully sent to player and found by clientside lua.

But like a year ago it still fails to mount files on client and whole init fails.
I'm working on it right now, already found out how the pack is generated and read by clientside lua.
Code is definetly broken somehow, just try to use it Yourself 🌵
(I mean luapack, not internal module)

Edit: I put the code into addons folder as You said, same issues.

@michak89
Copy link

michak89 commented Aug 17, 2020

Server:
image

Client:
image
Pack successfully downloaded.

Broken init:
image
image

🌵

@danielga
Copy link
Owner

danielga commented Aug 18, 2020

This is a different problem altogether, unrelated to the module. Please use the issues section of the addon. I'm assuming that the module is working, given the screenshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants