Bot crashes when automacro condition checking

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderators: Moderators, Developers

Message
Author
forbbs
Human
Human
Posts: 30
Joined: 26 Jul 2011, 21:03
Noob?: Yes

Bot crashes when automacro condition checking

#1 Post 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

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: Bot crashes when automacro condition checking

#2 Post by EternalHarvest »

Looks like $char->{equipment} got corrupted somehow. With r8580, error will be reported immediately on corruption.

Locked