I have added
Code: Select all
printf("\nlastStartId: "..lastStartId)
printf("\nlastId: "..lastId)
above
Code: Select all
for _, _table in ipairs(tables) do
if ( lastStartId >= _table.StartId and lastId <= _table.EndId ) then
at line 64~
result:
Code: Select all
075% [*************************************-------------]
lastStartId: 520000
lastId: 520420D:/micromacro/scripts/classes/memorytable.lua:67: attempt to compa
re nil with number
I don't know, how to print out nil values, but I have changed:
Code: Select all
for _, _table in ipairs(tables) do
if ( lastStartId >= _table.StartId and lastId <= _table.EndId ) then
found = true;
break;
end;
end;
to
Code: Select all
if StartId ~= nil and EndId ~= nil then
for _, _table in ipairs(tables) do
if ( lastStartId >= _table.StartId and lastId <= _table.EndId ) then
found = true;
break;
end;
end;
end
and now I get to 100% with this error:
Code: Select all
100% [**************************************************]
D:/micromacro/scripts/classes/memorytable.lua:469: bad argument #3 to 'sprintf'
(got nil)
line 469 is:
Code: Select all
outFile:write(sprintf("\t{Address = 0x%X, EnAddress = 0x%x, StartId = 0x%X, EndId = 0x%x, Name = \"%s\", Ranges = {%s}},\n",
v.Address, v.EnAddress, v.StartId, v.EndId, v.Name, rangesString));
so i printed out every variable in there, and got a nil error in v.StartId
then I have changed the line to:
Code: Select all
if v.StartId ~= nil then
outFile:write(sprintf("\t{Address = 0x%X, EnAddress = 0x%x, StartId = 0x%X, EndId = 0x%x, Name = \"%s\", Ranges = {%s}},\n",
v.Address, v.EnAddress, v.StartId, v.EndId, v.Name, rangesString));
end
and now I got this error:
Code: Select all
100% [**************************************************]
D:/micromacro/scripts/classes/memorytable.lua:253: attempt to compare nil with n
umber
line 253 is:
Code: Select all
if ( id >= _table.StartId and id <= _table.EndId ) then
then I have changed:
Code: Select all
if ( id >= _table.StartId and id <= _table.EndId ) then
return _table;
end;
to:
Code: Select all
if StartId ~= nil then
if ( id >= _table.StartId and id <= _table.EndId ) then
return _table;
end;
end
and now I can load the bot without stucking or errors, except this:
Code: Select all
100% [********************************************
Table not found for ID: 207051
Wrong value returned in update of item id: 207051
Table not found for ID: 210354
Wrong value returned in update of item id: 210354
Table not found for ID: 202075
Wrong value returned in update of item id: 202075
Table not found for ID: 202075
Wrong value returned in update of item id: 202075
Table not found for ID: 202075
Wrong value returned in update of item id: 202075
Table not found for ID: 202075
Wrong value returned in update of item id: 202075
Table not found for ID: 202075
Wrong value returned in update of item id: 202075
Table not found for ID: 221278
Table not found for ID: 221276
Table not found for ID: 221277
Table not found for ID: 221673
Table not found for ID: 220891
Table not found for ID: 210031
Table not found for ID: 210249
Table not found for ID: 221668
Table not found for ID: 221672
Table not found for ID: 210110
Waypoint files from D:/micromacro/scripts:
selling at a npc is not working with this btw