twistedmage1
Member
Last Crimbo bale created a thread about a bug, which can be found here http://kolmafia.us/showthread.php?8420-Bad-monster-value-quot-quot&highlight=bad+monster+value
The bug was abandoned because of reproducability problems.
I've been having the same problem, and after some fiddling I think I have figured out where and when it happens.
I wasn't sure whether posts in a closed bug would actually be seen by developers, sorry for creating a duplicate.
Anyway onto the bug!
Bale found that in some cases, when fighting monsters not yet added to mafia, the fight would fail at the start of the consult script with the message:
Recently I've been encountering the same issues fighting "a panicking knott yeti" and "groar".
From what I can tell, the problem happens in run_combat(), where mafia attempts to parse the 3 parameters, to be handed to the main() function of the consult script (namely int initround, monster foe, string page).
If the combat action is set to anything other than "combat consult script" things seem to work fine. For example setting the action as "try to run away" results in this.
Likewise creating a custom combat script as below:
Gives the same result.
However, creating a simple consult script (as suggested in the previous bug report):
and setting the custom combat script to:
Results in
(note that it fails before it enters the consult script and prints the monster name).
This all fits in with what Bale said last time. He mentioned that he was starting combat manually in the relay browser and then clicking the script button. There seemed to be some confusion over what he meant though. In your KOL account options, under the combat section, if you have "Enable Combat Action Bar" unchecked, then during fights in the relay browser, mafia adds a few buttons at the top, including "script". As far as I can tell that button results in a call to "run_combat()".
Anyway hope that's all clear.
The bug was abandoned because of reproducability problems.
I've been having the same problem, and after some fiddling I think I have figured out where and when it happens.
I wasn't sure whether posts in a closed bug would actually be seen by developers, sorry for creating a duplicate.
Anyway onto the bug!
Bale found that in some cases, when fighting monsters not yet added to mafia, the fight would fail at the start of the consult script with the message:
Code:
Bad monster value: ""
Recently I've been encountering the same issues fighting "a panicking knott yeti" and "groar".
From what I can tell, the problem happens in run_combat(), where mafia attempts to parse the 3 parameters, to be handed to the main() function of the consult script (namely int initround, monster foe, string page).
If the combat action is set to anything other than "combat consult script" things seem to work fine. For example setting the action as "try to run away" results in this.
Code:
> ashq visit_url("place.php?whichplace=mclargehuge&action=cloudypeak2");
Round 0: twistedmage wins initiative!
> ashq run_combat();
Round 1: twistedmage executes a macro!
Round 1: twistedmage casts RETURN!
Likewise creating a custom combat script as below:
Code:
[ default ]
try to run away
However, creating a simple consult script (as suggested in the previous bug report):
Code:
void main( int rnd, monster mob, string page )
{
print( "Monster: " + mob );
abort();
}
Code:
[ default ]
consult test_ccs.ash
Results in
Code:
> ashq visit_url("place.php?whichplace=mclargehuge&action=cloudypeak2");
Round 0: twistedmage wins initiative!
> ashq run_combat();
Bad monster value: ""
Bad monster value: ""
You're on your own, partner.
Click here to continue in the relay browser.
This all fits in with what Bale said last time. He mentioned that he was starting combat manually in the relay browser and then clicking the script button. There seemed to be some confusion over what he meant though. In your KOL account options, under the combat section, if you have "Enable Combat Action Bar" unchecked, then during fights in the relay browser, mafia adds a few buttons at the top, including "script". As far as I can tell that button results in a call to "run_combat()".
Anyway hope that's all clear.
Last edited: