require - not finding!

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

require - not finding!

Monogram
Basically I have 2 files in the same folder 1st reads:

---=======================
print ("\n\n\nSTARTING TEST =========\n\n\n");
--package.path = "Test/?.lua"; --tried this as well but not sure what the path should be exactly
require "sub_class.lua";
---=======================

However upon execution I always seem to get:
---=======================
[LUA]
        [string "sub_classs\Test\main.lua"]:21: in main chunk()
        [C]: in function 'require'()
[LUA] Error report: [string "sub_classs\Test\main.lua"]:21: module 'sub_class.lua' not found:
        no field package.preload['sub_class.lua']
        no file 'sub_classs/Test/sub_class/lua.lua'
        no file './sub_class/lua.so'
        no file '/usr/local/lib/lua/5.1/sub_class/lua.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file './sub_class.so'
        no file '/usr/local/lib/lua/5.1/sub_class.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
---=======================

What am I doing wrong?... I would just like for everything to be read from the same path / directory as that of the first / main executing file.

Many many thanks in advanced.
Loading...