Calling Gamemode Tables inside an addon

I am currently rewriting my gamemode modifications (TTT) into an addon. When running one of the HUDPaint functions, it tries to read from the LANG table, which is defined in the gamemode. Is there any way to import that table into addon context?

You made TTT?

Gamemode modifications. Read without the parentheses part

He edited it was my gamemode ( TTT ) modifications

It was “gamemode (TTT) modifications”, which I edited in order to prevent further confusion. Be so kind to not argue about this further.

b2t: It seems the LANG table loads just fine by calling it by its name, however parts of it are still nil for some reason.

[lua]local GetLang = LANG.GetUnsafeLanguageTable --(called after Init-hook)

L = GetLang()
text = L[ roundstate_string[round_state] ] – error: roundstate_string = nil
[/lua]

You’re not referencing roundstate_string (it’s not global) therefore it will be nil.

Oh I see, I guess roundstate_string isn’t actually part of the table then, but rather a table with all possible gamestates linked to their respective LANG names, in order to prevent unnecessary if-cases. I guess if I had read a bit closer I’d have found it on my own :/, sorry for that.