What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[CB] RunMacro

Either HB has broken this or the behavior is not up to date with the last couple of HB versions.

PHP:
Honorbuddy stopped
Exception thrown in CustomBehavior object for tag:
<CustomBehavior File="RunMacro" Macro="/dismount" NumOfTimes="1" />
 make sure the tag has all required attributes and try again.
Thread was being aborted.
Honorbuddy stopped

As you can see the syntax is correct as per the original post and the wiki, have also tried with the optional WaitTime included to no avail.


*Edit*

PHP:
[14:52:24:725] Unable to compile CustomBehavior for tag: <CustomBehavior File="RunMacro" Macro="/dismount" NumOfTimes="1" />
[14:52:24:725] Errors:
[14:52:24:725] d:\Bots\****\Quest Behaviors\RunMacro.cs(29,25) : error CS0305: Using the generic type 'System.Collections.Generic.Dictionary<TKey,TValue>' requires '2' type arguments
[14:52:24:725] Honorbuddy stopped
[14:52:24:725] Stop called!
[14:52:24:761] Exception thrown in CustomBehavior object for tag:
<CustomBehavior File="RunMacro" Macro="/dismount" NumOfTimes="1" />
 make sure the tag has all required attributes and try again.
[14:52:24:761] Thread was being aborted.
[14:52:24:761] Honorbuddy stopped

Managed to get a more clear error which might assist with a quick fix.
 
Last edited:
Synik,

I just tried RunMacro v1.2 (from the Wiki) on HB-2.0.0.3881 and HB-2.0.0.3895. Using the exact attributes you provide above, it succeeded in both tests.

Recall that RunMacro, Message, and UserDialog are Custom Behaviors that do not ship with Honorbuddy. References:
[wiki]Honorbuddy: Wiki-provided Custom Behaviors[/wiki]
[wiki]Honorbuddy Custom Behavior: RunMacro[/wiki]

My guess is...
...you upgraded your Honorbuddy, and forgot to re-install the non-shipped behaviors. I'll see if I can get Nesox to separate out a 'file not found' error from a 'compile error', but no promises. :)

If this turns out not to be your problem, please let us know.

cheers,
chinajade
 
Ok I have found the issue, it appears the code in the original post is broken but the code on the wiki runs fine.

Many thanks Chinajade :)
 
axazol said:
OMFG v1.2 is lit bit huge... =))

90% of it is an error-checking helper class. This class really belongs by itself, but there's no place in HB's architecture to put it, and still have it compiled. The plan is to roll this class into each of the behaviors when the helper class is complete.

This helper class will...
  • No longer say 'compile error' when a Profile Writer specifies the wrong parameter--instead, it will tell him exactly what's wrong.
  • Greatly simplifies and makes consistent the parameter handling for the business logic of each Custom Behavior.
  • Report attribute names that will be ignored because the CB doesn't recognize them (usually caused by a misspelling or a capcase problem with an attribute name)
  • Report if an attribute's value is out of range (say it is supposed to be positive, or on the interval [0..100] only, or one of a set of specific strings like "Npc" or "Gameobject")
In short, the error checking makes the Profile Writer's life much easier. As it stands now, each of these conditions is currently reported as a 'compile error', or aberrant behavior at run time (say, a negative 'distance' or zero was supplied).

Alas, like in all software 10% of the code actually does the work, and 90% of the code is checking user-provided input. I'd like to move this helper class out of each behavior for a number of reasons: maintenance, CB class size, etc. Alas, there is literally no place to put it and have the CB class still work. If you've any ideas, I'm all ears.

cheers,
chinajade
 
I've got the idea. ;)
And i have new one: Simple make a standalone plugin with that class and use it as source for any one else CB in future. Or even compiled into .dll.
And one suggestion: make function names more 'human' friendly and shorten. ;)
 
Back
Top