Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

require dll module #32

Closed
YohSambre opened this issue Jan 30, 2022 · 3 comments
Closed

require dll module #32

YohSambre opened this issue Jan 30, 2022 · 3 comments
Labels
R-Invalid Not an issue with Autorun

Comments

@YohSambre
Copy link

I want to load external modules which are located in my lua/bin folder but I don't understand how to do it with autorun.

yet in my lua file I indicate :

require("enginepred")

but the external console spits me "RunString:1: Module not found!

What to do ? I missed a step ? mhummmm

@Vurv78
Copy link
Owner

Vurv78 commented Jan 30, 2022

Make sure they are properly named:
e.g. gmcl_enginepred_win32.dll

Autorun just runs in an environment that inherits from _G, so there's nothing changed with require. Unless you mean sautorun.require, which is not meant to be used for binary modules

https://wiki.facepunch.com/gmod/Creating_Binary_Modules

@YohSambre
Copy link
Author

Make sure they are properly named: e.g. gmcl_enginepred_win32.dll

Autorun just runs in an environment that inherits from _G, so there's nothing changed with require. Unless you mean sautorun.require, which is not meant to be used for binary modules

https://wiki.facepunch.com/gmod/Creating_Binary_Modules

I'm afraid that's not enough, I still get the error that the module cannot be found

@Vurv78
Copy link
Owner

Vurv78 commented Jan 31, 2022

IIRC this also happens if the module you are trying to load has missing dependencies / that gmod can't access. Like in the case of my https://github.com/Vurv78/gfluid, you need to include Nvidia Flex's .dll's in your Garrysmod/Bin folder.

@Vurv78 Vurv78 added the R-Invalid Not an issue with Autorun label Jan 31, 2022
Repository owner locked and limited conversation to collaborators Jan 31, 2022
@Vurv78 Vurv78 converted this issue into discussion #33 Jan 31, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
R-Invalid Not an issue with Autorun
Projects
None yet
Development

No branches or pull requests

2 participants