Page 1 of 1

Bot crashes when automacro condition checking

Posted: 07 Apr 2013, 10:11
by forbbs
When monster Moonlight Flower used skill ST_FULLSTRIP (ID 476) to my bot,the following automacro will cause kore crash.
I wonder why? What's "unblessed reference"?

Code: Select all

automacro checkweapon {
	location not prontera
	timeout 4
	status not EFST_NOEQUIPWEAPON
	equipped rightHand none
	call {
		log tring equip
	}
}



errors.txt:

OpenKore version what-will-become-2.1
@ai_seq = skill_use attack follow
Network state = 5
Network handler = Network::DirectConnection
SVN revision: 8409
Loaded plugins:
plugins/avoidSkill.pl (avoidSkill; description: React to skills.)
plugins/breakTime.pl (breakTime; description: config.autoBreakTime)
plugins/macro/macro.pl (macro; description: allows usage of macros)

Error message:
Can't call method "name" on unblessed reference at plugins/macro/Macro/Automacro.pm line 344.

Stack trace:
Can't call method "name" on unblessed reference at plugins/macro/Macro/Automacro.pm line 344.
at plugins/macro/Macro/Automacro.pm line 344
Macro::Automacro::checkEquip('leftHand none') called at plugins/macro/Macro/Automacro.pm line 774
Macro::Automacro::automacroCheck('AI_pre', undef, undef) called at src/Plugins.pm line 433
Plugins::callHook('AI_pre') called at src/AI/CoreLogic.pm line 112
AI::CoreLogic::iterate() called at src/functions.pl line 737
main::mainLoop_initialized() called at src/functions.pl line 70
main::mainLoop() called at src/Interface.pm line 75
Interface::mainLoop('Interface::Console::Win32=HASH(0x2cbe6f4)') called at openkore.pl line 97
main::__start() called at start.pl line 136

error:
if (my $item = $char->{equipment}{$1}) {
* return lc($2) eq lc($item->name)?1:0

Re: Bot crashes when automacro condition checking

Posted: 15 May 2013, 20:32
by EternalHarvest
Looks like $char->{equipment} got corrupted somehow. With r8580, error will be reported immediately on corruption.