After the bot purchases Ancestral Spirit Herbs and Elemental Spirit Stones, I always get this error: C:/micromacro/scripts/rom/classes/inventory.lua:412: attempt to compare number with nil
The only thing I have in my character profile related to the merchant function is this:
That's strange. Line 412 is right in the middle of the buying function. If it successfully buys the mana and hp potions then gets the error, then that implies that it tried to buy something else but failed. Are you sure you don't have any of the other consumables set in your profile?
I don't think it's possible for getItemCount() to return nil so I think quantity is nil. To narrow it down try adding the following before line 412 and see what gets printed when you get the error.
if self:getItemCount(bestItem) == nil or quantity == nil then
printf("Trying to buy type %s\n",tostring(type))
printf("getItemCount returned %s\n",tostring(self:getItemCount(bestItem)))
printf("quantity returned %s\n",tostring(quantity ))
end
Hopefully I didn't make any syntax errors.
Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.