Byrth / Lua-Byrth

Lua Addons and Scripts
3 stars 2 forks source link

Gearswap error smn lua #448

Closed shubb1282 closed 6 years ago

shubb1282 commented 6 years ago

Hello having a problem after the latest update. My other lua's still work correctly it is just my smn one that is messing up. I am using Verda's lua and other ppl are having the same issue on their machines. here is the link to his download if you need it, also I have confirmed it gives the same error using his original files not just on my edited one.

http://www.ffxiah.com/forum/topic/47688/summoner-gearswap-yep-another-one-p/

I can make the error go away by commenting out the include for Mote-include.

function get_sets() mote_include_version = 2

-- Load and initialize the include file.
include('Mote-Include.lua')
include('organizer-lib.lua')

end

error i get when loading smn lua

Loaded you smn.lua file! Lua runtine error: Gearswap/flow.lua:341: Gearswap has detected an error in the user function get_sets: ...Program files (x86)Windower4addons/libs/images.lua:125: attempt to call global 'class' (a nil value)

Thank you for any help.

shubb1282 commented 6 years ago

Kind of stumbled upon the fix as I was trying to convert another gearswap file to look more like this one. My lines may vary if I have edited something but should be close. Seems like the error is caused by the icons for the Heads up display.

Go to SMN-lib.lua and comment out anything to do with icons. line 35 for me. (also after you do this one if you save and reload it'll keep pointing you to the next lines you need to comment out).

--if use_icon then --images =require('images') --end

line 20-31

--if use_icon then --icon_settings = { --name='avatar_icon', --color={alpha=hud_transparency,red=255,green=255,blue=255}, --size={height=hud_icon_width,width=hud_icon_height}, --pos={x=1300,y=0}, --draggable=false --} --avatar_icon = images.new('',icon_settings,nil) --images.path(avatar_icon,base_icon_dir..'base.png') --images.show(avatar_icon) --end

line 197-203 (202 and 203 may already be commented out)

--if use_icon then --images.path(avatar_icon,base_icon_dir..icon..'.png') --images.pos(avatar_icon,smn_info.box.pos.x, smn_info.box.pos.y-32) --images.update(avatar_icon) --end --button:update(info) --button:show()

Byrth commented 6 years ago

Going to close this, as the issue was related to a gearswap user file include and has been resolved.