Quantcast LoTROInterface - View Single Post - Beginners LUA Problem: Calling function located in another file
View Single Post
Unread 09-28-2010, 04:33 PM
SanDBoX's Avatar
SanDBoX SanDBoX is offline
The Undying
Interface Author - Click to view interfaces
Join Date: Sep 2010
Location: Idaho
Posts: 40
the __init__.lua is used if you are importing the package directory, all the examples i have seen use something similar to this:

in your main program file you load:
import "SandBox.Crafters"

which is the line that will call the __init__.lua file which in turn you have all your other imports located:

import "SandBox.Crafters.Main"
import "Sandbox.Crafters.CraftersWindow"

so any of your other packages you want to have access to the reasources in another page you just have to import the parent directory which calls the __init__

does that clear things up for you?
Reply With Quote