View Single Post
Unread 10-08-11, 02:12 AM   #5
Dziriki
Zombie
Join Date: Oct 2011
Posts: 2
hmmm... I still can't make it work.

I have placed the lua files in the correct order in RiftAddon.toc

Code:
RunOnStartup = {
	"objectfactory.lua",
	"addon.lua",
}
then, inside the objectfactory.lua I have the following function:

Code:
function create_object(objectname)
    creating objects... creating obkects...
end
I am not using the "local" tag on the function, so it should be public, right?
then inside addon.lua I call this function as:

Code:
create_object(testobject)
and I still get the same error:

Code:
attempt to call global 'create_object' (a nil value)
 In addon/addon.lua

Last edited by Dziriki : 10-08-11 at 02:34 AM.
Dziriki is offline   Reply With Quote