Is there a way, or at least some kind of work around that isn't horrendously convoluted, to pass a boolean variable as one of the arguments to raiseEvent? I'm currently using Mudlet 2.1, if that makes a difference (though I'm not sure I'd be willing to update just to fix this). Right now it just flat out doesn't work, and as far as I can tell it's not because I'm doing anything wrong - if I pass a different type of value, such as a string, then my function to handle the event does correctly receive the value as an argument.
Here's an example of what I've currently got:
function testEventHandler(event, name, defence, status) display(name) display(defence) display(status) end registerAnonymousEventHandler("test event", "testEventHandler")
Comments
Then read the expected values of the table.
args = {
thing = true,
etc,
etc
}
function testEventHandler(args)
Results of disembowel testing | Knight limb counter | GMCP AB files
https://github.com/Mudlet/Mudlet/blob/development/src/TLuaInterpreter.cpp#L295
Thought, 0 will still be seen as true by lua, unlike in C, so you'd have to do
instead of
and do the same in any other conditional involving it.
Maybe at a later date! I'll probably just work around it for now, and leave learning a new language for another time.
Results of disembowel testing | Knight limb counter | GMCP AB files
status = status == "true"
at the start of the event handler. Or use 1. Whatever works.
Site: https://github.com/trevize-achaea/scripts/releases
Thread: http://forums.achaea.com/discussion/4064/trevizes-scripts
Latest update: 9/26/2015 better character name handling in GoldTracker, separation of script and settings, addition of gold report and gold distribute aliases.
GMCP documentation: https://github.com/keneanung/GMCPAdditions
svof github site: https://github.com/svof/svof and documentation at https://svof.github.io/svof