of     1   

SkyDoesMinecraft
#185920167Wednesday, March 23, 2016 10:56 PM GMT

for some reason i cannot get this module to work (its named MainModule) module code: function thegame() end local memezzs = require(0) memezzs() function thegame() --the code that is supposed to be here is way too big for the forums and i'm positive it runs without error end function memes() thegame() end return memes require code: local memezzs = require(0) memezzs() what am i doing wrong
IlluminatiCat
#185920350Wednesday, March 23, 2016 10:59 PM GMT

Not certain but require code has to go on the top?
SkyDoesMinecraft
#185920491Wednesday, March 23, 2016 11:01 PM GMT

the require is requesting an asset id (which im too lazy to put there) just the module does nothing
Roblok1
#185920616Wednesday, March 23, 2016 11:03 PM GMT

its your module code. put this at the top of the module script: local moduleName = {}
SkyDoesMinecraft
#185920815Wednesday, March 23, 2016 11:06 PM GMT

i still got the same result
Roblok1
#185920842Wednesday, March 23, 2016 11:06 PM GMT

i forgot one thing. for every function you make in a module script, you are suppose to put the name of the module variable before the function name. all you need to do is this: local moduleName = {} function moduleName.functionName() end return moduleName
Roblok1
#185921231Wednesday, March 23, 2016 11:13 PM GMT

uh oh, i seem to have forgot yet another thing. your require statement is wrong too. the require function takes one argument, which is where the module script is. for example, the workspace or a tool. here is the correct way: local memezzs = require(workspace.memezzsModule) and if you ever need to call functions from the module, here is how you do it: memezzs.functionName()
SkyDoesMinecraft
#185921577Wednesday, March 23, 2016 11:19 PM GMT

im trying to get my module from an assetid ive added printing and everything works but my require statement is not launching the function code: local Main=require(0) delay(0,function() Main.thegame() end) too lazy to put the module id btw
SkyDoesMinecraft
#185922098Wednesday, March 23, 2016 11:29 PM GMT

bump
Roblok1
#185924797Thursday, March 24, 2016 12:13 AM GMT

oh i see. then idk.
Wr211122
#185928824Thursday, March 24, 2016 1:08 AM GMT

Try and put 'return memes' at the bottom. Inserting the keyword 'return' should always go on the top. Not doing so results in an error. - Wr
Wr211122
#185928860Thursday, March 24, 2016 1:08 AM GMT

Sorry i meant go on the bottom. - Wr

    of     1