This is probably caused by TLuaInterpreter::dirToNumber(...); this first
tests the input argument first for being a string - however a number
will always be able to be interpreted as a string so the code will then
check for a match against all the direction texts before dropping
through to the test for the input being a number - that too, will
succeed but then the number 13 will be found to be out of range and the
returned number will be set to be zero (error return value) which
triggers the "setExitStub: Need a dir number as 2nd argument" error
response.

A fix for this will need to take care that all uses of dirToNumber -
currently: setExitStub(...), connectExitStub(...), lockExit(...),
hasExitLock(...) and setExit(...) are not degraded by the modifications
- IIRC there are other issues with one or two of these that may also
need attention {connectExitStub(...) may also have issues in this area}.

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

Title:
  setExitStub incorrect error message on unknown direction type

Status in Mudlet:
  Confirmed

Bug description:
  Passing in 13 as a dirType causes a "setExitStub: Need a dir number as
  2nd argument" error. The logic should instead follow the current Lua
  error message guidelines for reporting what the value is + say
  "setExitStub: dirType must be between 1 and 10".

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

_______________________________________________
Mailing list: https://launchpad.net/~mudlet-makers
Post to     : mudlet-makers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mudlet-makers
More help   : https://help.launchpad.net/ListHelp

Reply via email to