Lua Error Runtime

Language: JP EN DE FR
New Items
2017-12-15
305 users online
Forum » Windower » Support » Lua error runtime
Lua error runtime
 Asura.Topace
Offline
Server: Asura
Game: FFXI
user: Topace
Posts: 113
By Asura.Topace 2017-05-20 12:29:14
Link | Quote | Reply
 
Everytime I try to load my rng lua it gives me lua runtime error: gearswap/refresh.lua :173: Gearswap failed to load file ...gram files (x86) windower4addons/libs/functions.lua/7 Cannot find the include file(string.lua) It literally worked yesterday and I've made no changes to it I'm not sure why it's giving me this all of a sudden.
 Leviathan.Vow
Offline
Server: Leviathan
Game: FFXI
user: woVow
Posts: 113
By Leviathan.Vow 2017-05-20 14:46:45
Link | Quote | Reply
 
Does your file include the line
Code
require('functions')
at some point?

I made changes to a number of libraries yesterday which hide them (to the extent possible) from interference from outside code (previously, if someone redefined the global variable string, most libraries would have ceased to work). The libraries now define the tables they rely on locally from the package.loaded table, rather than pulling from the global table.

I found no conflicts when I tested the changes, but I overlooked this case.
Gearswap redefines the require function within user files, and the implementation does not check package.loaded. As a result, when you require the functions library, it can't find Lua's basic string table.

I think the best solution is to add a check to package.loaded within Gearswap's include_user function (and to add the functions table to the user environment, which seems like something that was just overlooked).
 Lakshmi.Miang
Offline
Server: Lakshmi
Game: FFXI
user: Miang
Posts: 19
By Lakshmi.Miang 2017-05-20 14:53:19
Link | Quote | Reply
 
Asura.Topace said: »
Everytime I try to load my rng lua it gives me lua runtime error: gearswap/refresh.lua :173: Gearswap failed to load file ...gram files (x86) windower4addons/libs/functions.lua/7 Cannot find the include file(string.lua) It literally worked yesterday and I've made no changes to it I'm not sure why it's giving me this all of a sudden.

The dev branch of windower has some changes to the addons/libs which means Gearswap doesn't work on the dev branch at the moment. If you run the standard (non dev) launcher and copy the addons/libs files from there to the dev version you're running, then //lua reload gearswap, it should work again.
 Leviathan.Vow
Offline
Server: Leviathan
Game: FFXI
user: woVow
Posts: 113
By Leviathan.Vow 2017-05-20 15:50:27
Link | Quote | Reply
 
Rather than replace all of your libraries, you should be able to place an old copy of functions.lua (from here: https://raw.githubusercontent.com/Windower/Lua/live/addons/libs/functions.lua) in your GearSwap/data folder. Make a note to delete it at some point.
 Leviathan.Vow
Offline
Server: Leviathan
Game: FFXI
user: woVow
Posts: 113
By Leviathan.Vow 2017-05-20 18:14:26
Link | Quote | Reply
 
Should work now -- you can remove require('functions') from your file, as well.
necroskull Necro Bump Detected! [129 days between previous and next post]
 Quetzalcoatl.Cherylin
Offline
Server: Quetzalcoatl
Game: FFXI
user: Cherylinn
Posts: 6
By Quetzalcoatl.Cherylin 2017-09-26 08:48:11
Link | Quote | Reply
 
I am pretty bad at this stuff...but I'm having this exact problem. Just out of the blue, my luas stopped working last night and that's the message I'm getting. Well, to be precise it says:

GearSwap: Lua runtime error: gearswap/refresh.lua:174:GearSwap: File failed to load: ...s (x86)Windower4/addons/gearswap/data/iterator.lua:44: attempted to call global 'class' (a nil value)

Sad panda. Can anyone help?
Log in to post.