WoW mob info 2 data converted to excel spreadsheet

right, I though the LUA code would work better.

Right I created a folder and copied the MobInfo2 folder from wow\interface\addons to that folder
Copy the MobInfo2.lua file from my wow\wtf\account\[account name]\SavedVariables to that folder
Download lua5_1_2_Win32_bin.zip from http://luabinaries.luaforge.net/download.html and extracted to that folder
Then I created the following code on a file called info.lua
Code:
floor = math.floor;

function GetDifficultyColor() return {r = 1.0, g = 1.0, b = 1.0} end



loadfile("MobInfo2.lua")();

loadfile("MobInfo2/MobInfo2.lua")();

loadfile("MobInfo2/MI2_Health.lua")();

loadfile("MobInfo2/MI2_ConvDropRate.lua")();



columns = { "name", "level", "healthMax", "kills", "loots" };

io.output("data.csv");

for i, v in ipairs(columns) do io.write(v .. ";"); end

io.write("\n");



for key,v in pairs(MobInfoDB) do

	local name, level = string.match(key, "^(.-):(%d+)");

	local data = MI2_GetMobData(name, level);

	io.write(name .. ";" .. level .. ";");

	for i = 3, #columns do io.write(tostring(data[columns[i]]) .. ";"); end

	io.write("\n");

end


I run the LUA5_1.exe file using the following command
loadfile("info.lua")();


I have done the above, but I am only getting a blank csv spreadsheet

And the code when run is generateing the following error:

Code:
info.lua:33: attempt to concatenate local 'level' (a nil value)
stack traceback:
        info.lua:33: in main chunk
        stdin:1: in main chunk

Any ideas whats wrong?
 
Last edited:
Back
Top Bottom