Module() question

Hello, I wanted to ask, does G.module() works over multiple files, like I want to create a module, which has realm specific functions, is it possible to do module(name) multiple times? like one clientside & one serverside?

I assume you mean like this:


module(<module>)
module(<module>)
module(<module>)

Rather than:


module(<table of module names>)

In which case, yes you can use module more than once in your code, and yes, you can also use it on both client and server.

I dont mean like module three times in one file, I mean module with the same name in 2 different file names.

Just include() second file from first one.

I want functions realm specific, some client, some server.

But using the same module?

Then take all of your clientside functions in the module and put around them this code:


if (CLIENT) then
<Functions>
end

And the same for your server functions:


if (SERVER) then
<Functions>
end

When the module is executed, it will only include functions specific to the realm from which it is called.

Sorry if I got it wrong again, I’ve only just got up.