Gearswap Textbox

Language: JP EN DE FR
New Items
2023-11-19
users online
Forum » Windower » General » Gearswap textbox
Gearswap textbox
Offline
Posts: 182
By Sammeh 2017-02-12 15:08:06
Link | Quote | Reply
 
I'm trying to make a gearswap textbox using 'texts'. Everything works great except for when I use a mouse to click in screen (pretty rare, but sometimes) - I get an error.

Lua runtime error: libs/texts.lua:613: attempt to index local 'm' (a nil value).

I've used texts in several other addons without issue - so my gut is this is something specifically about how I'm loading it inside of gearswap.



texts = require('texts')

lullaby_txt = {}
lullaby_txt.pos = {}
lullaby_txt.pos.x = -180
lullaby_txt.pos.y = 45
lullaby_txt.text = {}
lullaby_txt.text.font = 'Arial'
lullaby_txt.text.size = 10
lullaby_txt.flags = {}
lullaby_txt.flags.right = true

lullaby_box = texts.new('${value}', lullaby_txt)

......
(add other logic here to fillup lullaby_box info).


Any pointers?
 Leviathan.Vow
Offline
Server: Leviathan
Game: FFXI
user: woVow
Posts: 125
By Leviathan.Vow 2017-02-12 17:55:39
Link | Quote | Reply
 
You're correct. Gearswap already exposes the texts library (texts already points to the texts table). Remove the require line and it should work.

Superflous explanation of why that error occurs
Offline
Posts: 182
By Sammeh 2017-02-12 21:59:29
Link | Quote | Reply
 
Magic ;)

thanks!
Log in to post.