← Back to team overview

mudlet-makers team mailing list archive

[Bug 1456794] Re: expandAlias("command", nil) should not error

 

This Lua sub-system command is mapped to TLuaInterpreter::Send(...) and
the second argument, if specified, is a boolean that is recorded as
wantPrint (and defaults to TRUE if NOT specified) and then dispatched to
the Host class instance with:

pHost->send( QString( luaSendText.c_str() ), wantPrint, false );

Given that boolean FALSE seems to be largely inter-changeable with NIL I
don't see how expandAlias("x", nil) can be treated as expandAlias("x")
when the latter is already coded as expandAlias("x", true) and NOT
expandAlias("x", false)...

I suspect this will become a WON'T FIX or it will break existing code
won't it?

Fair enough, the error messages are not up to scratch for this function,
but sadly that is not uncommon!

** Changed in: mudlet
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Mudlet
Makers, which is subscribed to Mudlet.
https://bugs.launchpad.net/bugs/1456794

Title:
  expandAlias("command", nil) should not error

Status in Mudlet the MUD client:
  Confirmed

Bug description:
  expandAlias("x", nil) currently gives this error: <Send: wrong
  argument type>

  expandAlias("x", nil) should be treated the same as expandAlias("x")

To manage notifications about this bug go to:
https://bugs.launchpad.net/mudlet/+bug/1456794/+subscriptions


References