z16 / Lua

Lua Addons and Scripts
0 stars 0 forks source link

Yush not finding data files. #37

Open amackenzie opened 10 years ago

amackenzie commented 10 years ago

I put Ionasol.lua, Ionasol_WHM.lua, Ionasol_WHM_THF.lua in Yush's data folder, and tested it in all lowercase and the case presented here, but it can find none of them, and only reports:

No matching file found for Ionasol (WHM/THF)

The documentation I was following is the one at http://wiki.windower.net/doku.php?id=addons:yush

Other addons (Gearswap, etc) are all working correctly.

Windower is installed to d:\programs\Windower4, and the directory the files are located in are in d:\programs\Windower4\addons\yush\data.

z16 commented 10 years ago

Last I checked it worked fine for me. However, I won't be able to log on and test for at least a week. If by then you find out anything else, let me know, I'm not seeing why it wouldn't work.

amackenzie commented 10 years ago

I added the line

print('Attempting to load '..basepath .. filepath.path:gsub('name', player.name):gsub('main', player.main_job):gsub('sub', player.sub_job or ''))

right in front line 112 of yush.lua ("file = loadfile(basepath...") to see what it was trying to load. The concatenation is copied from line 112's loadfile argument.

The results for the basepath seem to be missing some slashes, what I get printed to the Windower console is:

Attempting to load d:programsWindower4/addons/yush/data/Ionasol_WHM_THF.lua
Attempting to load d:programsWindower4/addons/yush/data/Ionasol_WHM.lua
Attempting to load d:programsWindower4/addons/yush/data/Ionasol.lua

I'm not very familiar with Lua, but assuming this isn't a quirk of the print function, maybe something's borking the basepath that Windower is providing?

z16 commented 10 years ago

I'm pretty sure it's just not displaying right because it uses backslashes instead of forward slashes, which the console uses to escape characters.

amackenzie commented 10 years ago

You are correct, I found that printing it to the chatbox instead of the console would print it with the slashes.

I've included a screenshot with the paths from the addon printed out, as well as the folder involved. I'm hoping I didn't miss something obvious in my placement of the data files.

2014-08-07_00-49-29