gLua->RunModule() no worky. Why.

  1. Make function
  2. Break it
  3. Don’t fix it
  4. ???
  5. Proft.

// C++ equivilent of ‘require’
virtual bool RunModule( const char* strName ) = 0;

Why doesn’t this work?

Well that’s great but we need more info. Post your module’s source?

In no situation does the function do anything. I challenge you to make that function work.

Put a simple module in includes/modules/mymod.dll then gLua->RunModule(“mymod”) in your other dll. Won’t load. No other module will load either.

[editline]30th December 2010[/editline]

I’ve also tried doing gLua->PushPath(“includes/modules”) and all other variations (lua/includes/modules and garrysmod/lua/includes/modules).

Well, it won’t change a bit on the method being broken, but you could use gLua->RunString() to include a module as workaround.

Hrm. Fudge.

Well that’s weird. I wonder if it’s deprecated?

It should still work though, why would they actually CUT functionality like that? Unless they want to break peoples code.

It’s probably strictly meant for internal GMod code only. For instance, I have stuff in my headers for my Lua manager that take care of gamemode loading, but it’s only because I need those functions to be accessed by server.dll and server.dll.

As a result, if the stuff is reverse engineered, or just plain exported, then you can mess around with it.

It only loads Lua modules, not binary modules.

Ah, thanks ************. Haha, wow you must’ve attained true infamy to be word filtered.

Don’t you know? Chrisaster is awesome.

Yeah, no. Snip.

Heh, yeah I know about all that.