By Leviathan.Shosei 2016-07-21 18:06:37
I really appreciate the help; I have a very basic understanding of lua building, and the language really binds me up.
The addon is called ES, so i inserted this line into my GS lua:
send_command('ES settext '..Element_Array[Element_Index])
Then in the ES addon, I'm struggling with how to structure picking it up. The addon uses a settings file pretty much identical to that of the distance addon, so position, size of text, font, color, can be manipulated. So here's the addon with my changes; any more advice you can give would be greatly appreciated.
When I reload the addon, i get the error ES: lua runtime error: attempt to call a string value.
config = require('config')
texts = require('texts')
settings = config.load({})
ES = texts.new(settings)
ES:show()
windower.register_event('load', function(new)
ES:text('Element: Thunder');
ES:show()
end)
windower.register_event('addon command', function(command,..Element_Array[Element_Index])
local args = T{..Element_Array[Element_Index]}
if command == 'settext' then
text_content = ES:text('Element: '..Element_Array[Element_Index]);
update_text()
end
end)