Page 3 of 7
Re: Table not found for ID
Posted: Tue May 31, 2011 10:56 am
by lisa
If you comment out this is item.lua
Code: Select all
-- tmp = memoryReadInt( proc, self.BaseItemAddress + addresses.idCardNPCOffset );
-- npcInfoAddress = GetItemAddress( tmp );
-- nameAddress = memoryReadInt( proc, npcInfoAddress + addresses.nameOffset );
-- self.Name = "Card - "; -- We should add a string so we can localize this
-- elseif ( self.Id >= 550000 and self.Id <=552000 ) then
-- We need to get info from item...
-- tmp = memoryReadInt( proc, self.BaseItemAddress + addresses.idRecipeItemOffset );
-- itemInfoAddress = GetItemAddress( tmp );
-- nameAddress = memoryReadInt( proc, itemInfoAddress + addresses.nameOffset );
-- self.Name = "Recipe - "; -- We should add a string so we can localize this
It no longer errors and stops the bot but those items no longer sell to the merchant, I believe it gets the wrong or no value for the color (quality) of the items. So I am guessing if we make it skip the items in the memorytable it will have the same affect.
Re: Table not found for ID
Posted: Tue May 31, 2011 1:26 pm
by sfrattini
confirmed, broken after 3.0.11

Re: Table not found for ID
Posted: Tue May 31, 2011 8:45 pm
by rock5
Administrator wrote:Can you have it ignore any continued work on those invalid addresses? I'm not sure if this will cause useful items to become unused by the bot, or just ignore the garbage. Only one way to find out.
I did. I had it so if tmpId = nil it would still search forward and backward but it caused an error. Seems there are other items that return nil for the tmpId.
I'm making more progress today figuring it out. Give me a bit more time.
Re: Table not found for ID
Posted: Tue May 31, 2011 9:08 pm
by rock5
This is what I found out so far.
In GetItemAddress some items, even ones that don't cause errors, return 0 for tmpAddress and nil for tmpId. Because tmpId = nil it is out of the threshhold so it doesn't look forward and backward so it doesn't recieve a name. Instead it will get a namne "<EMPTY>". I had such an item in my Item Shop backpack "Phoenix's Redemption".
So this is what I did.
1. Changed this line
Code: Select all
if ( id ~= tmpId and IdIsInRange( tmpId, id, idThreshold ) ) then
to
Code: Select all
if ( id ~= tmpId and IdIsInRange( tmpId, id, idThreshold ) ) or tmpId == nil then
This allowed the Stone Rotan Wood to work but caused an error with the Phoenix's Redemption.
2. I opened the Item Shop Backpack and then reran the bot and got no error. So it looks like we need to open the itemshop backpack as well as the normal packpack.
Re: Table not found for ID
Posted: Tue May 31, 2011 9:33 pm
by Administrator
So the problem is that the game hasn't fully loaded all the information (because the inventories haven't been accessed yet)? That could explain it. It should be a pretty simple fix, too, if someone knows what the function is to open the item shop inventory.
Re: Table not found for ID
Posted: Tue May 31, 2011 11:54 pm
by rock5
Ok. I committed a fix for both problems in rev 605.
Re: Table not found for ID
Posted: Wed Jun 01, 2011 1:10 am
by sfrattini
Hi,
Very happy you are working on the issue: I made the update to 605 but still get this ID errors. Is there anything else I am missing?
Thanks
P.S.: where do I find the code above you changed?
Re: Table not found for ID
Posted: Wed Jun 01, 2011 4:09 am
by gloover
sfrattini wrote:Hi,
Very happy you are working on the issue: I made the update to 605 but still get this ID errors. Is there anything else I am missing?
Thanks
P.S.: where do I find the code above you changed?
Same issue, "Table not found..." by 6 or 7 Items, evan after update to rev 605!
Btw. after I've updated my micromacro to ver. 1.01 my bitdefender bitchs about lua51.dll "Generic.Virus..." - the earlier version of micromacro was not detected as a virus!
Re: Table not found for ID
Posted: Wed Jun 01, 2011 4:14 am
by rock5
sfrattini wrote:Hi,
Very happy you are working on the issue: I made the update to 605 but still get this ID errors. Is there anything else I am missing?
Thanks
P.S.: where do I find the code above you changed?
To view the changes that have been applied, right-click the 'rom' folder and select 'TortoiseSVN/Show Log'. Select the revision you want to view in the top panel. In the middle panel you can read the release comments and in the bottom you will see a list of the changed files. If you double-click one of the files it will show you what has changed in that file.
What error are you getting?
Also which items are you having problems with and where are you keeping them?
Re: Table not found for ID
Posted: Wed Jun 01, 2011 4:57 am
by sfrattini
I am still getting "table ID" errors on several items when bot loads and everytime it loots, plus of course vendoring these items does not work anymore (there is also another thread opened early today).
If you tell me where I can find that code you changed I will try to use the above described workaround in case a solution is not found.
thanks again.
P.S.: I will attach a screenshot later when I am back home so you can also see the Ids.
Re: Table not found for ID
Posted: Wed Jun 01, 2011 9:08 am
by lisa
Hmm not sure if it was the rev 605 or not but yesterday I had very few table not found and it sold everything without a hitch. Today I updated to 605 and I get a lot more wrong value returned and it won't sell any armor items at all.
id seem to all be 210000 - 230000
any chance they changed when it starts for those id's like the 800000 +
Code: Select all
if ( self.StartId > 800000 ) then -- Special case for one table that starts 32 bytes before...
Re: Table not found for ID
Posted: Wed Jun 01, 2011 11:44 am
by Administrator
gloover wrote:
Btw. after I've updated my micromacro to ver. 1.01 my bitdefender bitchs about lua51.dll "Generic.Virus..." - the earlier version of micromacro was not detected as a virus!
Ignore it and add it to the ignore list. It is a false positive. The Lua DLL that comes with MicroMacro contains additional code that the 'normal' one does not.
Re: Table not found for ID
Posted: Wed Jun 01, 2011 12:49 pm
by sfrattini
Lisa is correct, see attachment. Seems they are all in the 220000 range.
Is there any way to bypass the problem and be able to vendor those items?
Re: Table not found for ID
Posted: Wed Jun 01, 2011 7:06 pm
by lisa
for now you could use this for vendoring
Code: Select all
if player:openStore("Pancer") then -- opens the store, then continues if it opened.
for i, item in pairs(inventory.BagSlot) do
if item.SlotNumber >= (settings.profile.options.INV_AUTOSELL_FROMSLOT + 60) and
(settings.profile.options.INV_AUTOSELL_TOSLOT + 60) >= item.SlotNumber then
item:use() -- sells it to the store
end
end
end
Change the NPC name to suit, it is Pancer atm which is the vendor used when doing KS runs.
It will sell everything that it can possibly sell in the slots set by your profile options. Be warned it will sell everything, the usual filters of white,green or names won't work. So everything in the slot range specified will be sold. Of course monster cards can't be vendored so they will stay in your bags.
Re: Table not found for ID
Posted: Wed Jun 01, 2011 9:31 pm
by rock5
lisa wrote:Hmm not sure if it was the rev 605 or not but yesterday I had very few table not found and it sold everything without a hitch. Today I updated to 605 and I get a lot more wrong value returned and it won't sell any armor items at all.
I believe there was a sutuation before 605 that some items would fail to get the name and end up with <EMPTY> as a name. It may have done this quietly so even though you got less errors it still happened. So if you reverted to 604 you might get less errors but if you print out the inventory you would see items with ids but <EMPTY> names. I don't know if that's what happened to you because you say it used to sell.
Have you tried figuring out why it isn't selling? Try debugging.
sfrattini wrote:Lisa is correct, see attachment. Seems they are all in the 220000 range.
I bought some of those items and no matter how I tested them they worked. They even worked fine when I reverted to 604. I think this is definately a different issue than what I fixed.
Also note, you may be getting more messages than before 605 because I believe some items were slipping through with <EMPTY> as a name without writing any error mesages. Whereas now, any item that fails to get a name will print a message.
lisa wrote:any chance they changed when it starts for those id's like the 800000 +
That's an idea. I'll look into it later. I've run out of time for now.
Re: Table not found for ID
Posted: Wed Jun 01, 2011 10:03 pm
by kanta
For the item sell code, is there a way to make it skip empty slots? As it is, it tries to sell from every slot regardless of whether there's an item available or not. This can take a while when there's possibly 30+ empty slots. I tried looking through the inventory.xml autosell function but it's just too complex for me to isolate the proper code I'd need.
Re: Table not found for ID
Posted: Wed Jun 01, 2011 10:10 pm
by lisa
lisa wrote:Hmm not sure if it was the rev 605 or not but yesterday I had very few table not found and it sold everything without a hitch. Today I updated to 605 and I get a lot more wrong value returned and it won't sell any armor items at all.
id seem to all be 210000 - 230000
any chance they changed when it starts for those id's like the 800000 +
Code: Select all
if ( self.StartId > 800000 ) then -- Special case for one table that starts 32 bytes before...
As a bit of an update, I have rev 604 atm. Today when I started bot for the first time I had bag and item shop open, I haven't gotten 1 single tobale not found or wrong value. Everything is working as it should.
Not sure if it is just some random thing or if having the bags open helped, either way it is running perfectly =)
Re: Table not found for ID
Posted: Thu Jun 02, 2011 12:58 am
by rock5
605 fixed 2 errors. One of them required the item shop to be opened just like the backpack already was.
So you can apply only that fix if you update only the inventory.lua file to 605.
As to the errors you get when you updated to 605, now that you have 604, try starting the commandline and typing in the following
Code: Select all
for k,v in pairs(inventory.BagSlot) do print(k, v.Id, v.Name) end
and see if there are any items with ids but <EMPTY> as the name.
Re: Table not found for ID
Posted: Thu Jun 02, 2011 3:53 am
by sfrattini
Alright, I have been playing around a bit and ended up in having a very strange situation.
First of all let me specify that I have 2 farming and NPC selling bots amd the curious thing is that I have problems with only 1 of them, the other loads and sell with NO errors.
So I have created the function suggested by Lisa and now it sells...but somehow ignores all the items contained in bag1 and starts from the second one...i guess I have to check a bit more this string:
"if item.SlotNumber >= (settings.profile.options.INV_AUTOSELL_FROMSLOT + 60)"
Another thing I have noticed, if you start the bot naked

(just switch equip) you get no errors but when u switch back the issues with the table ID comes back, so is it possible that this is somehow related to the gear equipped?
I hope this helps. Please let me know if there is any progress.
Re: Table not found for ID
Posted: Thu Jun 02, 2011 4:24 am
by hagenleu
Same problem selling items at NPC Pancer out KS.
On a old PC (winXP 32bit SP3) i have a RK, have update to rev 605 and from yesterday all seems returned at normality.
On a new PC (win7 64bit), i have a RK and a MD farming KS.
The RK is ok (as the one on the other PC), but the MD doesn't sell nothing at all (first of the update at rev 605 it selling something but not all); mm doesn't break, but on the initial load frame it display the "Table not found ...." know issue, ad enter in a loop (full inventory, leave istance, dont' sell items, enter and releave...and so on).
Maybe something related to the class of the botPG?
I'm going to try a RP instead of the MD to see what appen.