Thread Tools Display Modes
Prev Previous Post   Next Post Next
Unread 10-07-11, 10:41 AM   #1
Dziriki
Zombie
Join Date: Oct 2011
Posts: 2
Call a function in another codefile

Hello, I am relatively new to programming in LUA. I cannot figure out how to call a function located in a secondary .lua file inside the addon folder.

I have 3 files in the folder.
addon.lua
objectfactory.lua
RiftAddon.toc

I add both lua files to RiftAddon "RunAtStartup" section.
But every time I try to call a function in objectfactory I get this error:

Error: attempt to index global "function" (a nil value) In addon/addon.lua

Any advice would be greatly appreciated.

Last edited by Dziriki : 10-07-11 at 10:41 AM. Reason: Typos.
Dziriki is offline   Reply With Quote
 

Go BackRiftui » Developer Discussions » Lua Help » Call a function in another codefile


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off