Error when checking inventory
Posted: Tue Jan 26, 2010 6:04 pm
Whenever the bot tries to run this code, it generates an error (see below). Basically, with this code, I am checking my inventory every time I kill an enemy to check to see if it is full. I don't entirely know why the error is ocurring. Should I change "50" to 50, or is there anything else I need to change?
Thanks in advance!
Code: Select all
<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
if(sendMacro("GetBagCount();") > "50") then
inventory:update();
end
if(sendMacro("GetBagCount();") == "60") then
loadPaths("boarstomerch.xml");
end
]]>
</onLeaveCombat>
Code: Select all
Tue Jan 26 17:37:55 2010 : ...micromacro/scripts/rom/classes/player.lua:804: Error in your profile: onLeaveCombat error: [string "..."]:3: attempt to compare string with number
Tue Jan 26 17:37:55 2010 : Execution error: Runtime error