Quantcast WoWInterface - View Single Post - Interface toc file, loading issue
View Single Post
10-21-19, 07:27 AM   #1
Sinaris
A Wyrmkin Dreamwalker
 
Sinaris's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 54
Interface toc file, loading issue

Hello folks,

after some years i started to work on my (new/old) interface again. But for some odd reason my files are not loading in the right direction.

I am using the same template files i used a couple of years ago.

TestUI
Code:
Core\Engine.lua
Core\Commands.lua
TestUI.toc
TestUI.xml
TestUI_ConfigUI
Code:
Core\Core.lua
TestUI_ConfigUI.toc

The main files has some small loading engine like i used before:

Code:
local AddOnName, Engine = ...

Engine[1] = {} -- UI
Engine[2] = {} -- DB
Engine[3] = {} -- M
Engine[4] = {} -- L

_G[AddOnName] = Engine

print( AddOnName .. ' loaded!' )
The file is loading. Ingame i got the print message.

The toc file is looking like this:

Code:
## Interface: 80205
## Title: TestUI
## OptionalDeps: TestUI_ConfigUI
## SavedVariables: TestUIData
## SavedVariablesPerCharacter: TestUIDataPerChar, CurrencyData

TestUI.xml
Everything is loading. So there are no loading issue with the main addon.


but when i want to load the TestUI Config file with this content:

TOC file

Code:
## Interface: 80205
## Title: TestUI ConfigUI
## Version: 16
## RequiredDeps: TestUI
## SavedVariables: TestUIConfigAll, TestUIConfigPublic
## SavedVariablesPerCharacter: TestUIConfigPrivate

Locales\English.lua

Core\Core.lua

Core.lua
Code:
local UI, DB, M, L = unpack( TestUI )

if TestUI then
	print( 'TestUI loaded!' )
else
	print( 'TestUI not loaded!' )
end

i got this ingame error:

Code:
Message: Interface\AddOns\TestUI_ConfigUI\Core\Core.lua:1: bad argument #1 to 'unpack' (table expected, got nil)
Time: Mon Oct 21 15:17:35 2019
Count: 1
Stack: Interface\AddOns\TestUI_ConfigUI\Core\Core.lua:1: bad argument #1 to 'unpack' (table expected, got nil)
[C]: in function `unpack'
Interface\AddOns\TestUI_ConfigUI\Core\Core.lua:1: in main chunk

Locals: (*temporary) = nil
(*temporary) = "table expected, got nil"
i dont understand it because the main addon is loaded and the ConfigUI must be loaded after the main addon.
Back in the past i used the same code without any errors.

Maybe someone can help me out.

The Files can be found here:

natias.de/TestUI.rar
  Reply With Quote