I'm using this macro and it works perfectly.
macro id {
$id = @inventory(Magnifier)
do deal 0
pause 6
do deal add $id
pause 1
do deal
pause 6
do deal
}
The problem occurs when you do not have the item in inventory (Magnifier).The openkore stops running and displays the following error:
My goal is to deliver the item to another bot. Is there any way to fix this error, or use different codes for the macro?
Assertion failed!
at c:/openkore/src/deps/Carp/Assert.pm line 271
Carp::Assert::assert('') called at src/Utils/ObjectList.pm line 165
ObjectList::get('InventoryList=HASH(0x4fe2b84)', -1) called at (eval 61) line 5
InventoryList::get('InventoryList=HASH(0x4fe2b84)', -1) called at src/Commands.pm line 1261
Commands::cmdDeal('deal', 'add -1') called at src/Commands.pm line 283
Commands::run('deal add -1') called at plugins/Macro/Utilities.pm line 455
Macro::Utilities::processCmd('deal add -1') called at plugins/Macro/Utilities.pm line 509
Macro::Utilities::callMacro('mainLoop_pre', undef, undef) called at src/Plugins.pm line 430
Plugins::callHook('mainLoop_pre') called at src/functions.pl line 68
main::mainLoop() called at src/Interface.pm line 75
Interface::mainLoop('Interface::Console::Win32=HASH(0x3d4d2a4)') called at c:\openkore\openkore.pl line 97
main::__start() called at c:\openkore\openkore.pl line 187
at c:/openkore/src/deps/Carp/Assert.pm line 271
Carp::Assert::assert('') called at src/Utils/ObjectList.pm line 165
ObjectList::get('InventoryList=HASH(0x4fe2b84)', -1) called at (eval 61) line 5
InventoryList::get('InventoryList=HASH(0x4fe2b84)', -1) called at src/Commands.pm line 1261
Commands::cmdDeal('deal', 'add -1') called at src/Commands.pm line 283
Commands::run('deal add -1') called at plugins/Macro/Utilities.pm line 455
Macro::Utilities::processCmd('deal add -1') called at plugins/Macro/Utilities.pm line 509
Macro::Utilities::callMacro('mainLoop_pre', undef, undef) called at src/Plugins.pm line 430
Plugins::callHook('mainLoop_pre') called at src/functions.pl line 68
main::mainLoop() called at src/Interface.pm line 75
Interface::mainLoop('Interface::Console::Win32=HASH(0x3d4d2a4)') called at c:\openkore\openkore.pl line 97
main::__start() called at c:\openkore\openkore.pl line 187
I'll keep trying while I wait for help. Thank you for your attention.
