Page 1 of 1

[SOLVED] Module loading error...

Posted: Sat Apr 18, 2015 5:46 pm
by RBXcpmoderator12345
I'm trying to make a FNaF type game, and I decided to put the characters' code in seperate .lua files.
I was making the first one, but i got a error trying to load it.
ser.lua is the serialization library
cron.lua is for timing
1.lua is one of the characters' code
.love = https://www.mediafire.com/?2gcjliirjw8evzd

Re: Module loading error...

Posted: Sat Apr 18, 2015 9:28 pm
by I~=Spam
You write:

Code: Select all

require "cron.lua"
but it should be:

Code: Select all

require "cron"
Lua in later versions automatically adds the ".lua" when using the require function

Also I noticed that you don't return anything in 1.lua If you don't add a "return somthing" at the end of the file then anim1 will only get a bool with a value of true (the true means that the file was successfully loaded).