Mapper In/Out Exit Stubs

Post Reply
Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Mapper In/Out Exit Stubs

Post by Jor'Mox »

So, it was brought to my attention recently that my generic mapping script has issues with in/out exits (I was unaware because the game I play doesn't use them). Upon further testing, I determined that the issue actually lies with the setExitStub function, which returns an error if I give it 11 or 12 as an argument, and it insists that the exit stub value must be between 1 and 10. The current release (3.0.0 iota) allows me to add exit stubs in the in/out directions via the mapper GUI, and obviously I can also set actual exits in those directions as well, including using the setExit function. Is this a known problem, and if so, is there a workaround in place, aside from me hacking something together as a stand-in?

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: Mapper In/Out Exit Stubs

Post by Belgarath »

It was explained to me by the Slyster that it is a known issue with the underlying code in Mudlet for now, and it should be fixed in the next release.

I got around it by, as you mentioned, just hacking the script so it didn't create or look for in/out exit stubs.

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Mapper In/Out Exit Stubs

Post by SlySven »

If you want to quickly hack the source code you need to change the code in the TLuaInterpreter::setExitStub function defined at around line 1835 (it may not be on that precise line as it depends on the version of code you are looking at) in the ./src/TLuaInterpreter.cpp file:

Code: Select all

    if(dirType>10 || dirType < 1)
    {
        lua_pushstring( L, "setExitStub: dirType must be between 1 and 10" );
        lua_error( L );
        return 1;
    }
to:

Code: Select all

    if(dirType>12 || dirType < 1)
    {
        lua_pushstring( L, "setExitStub: dirType must be between 1 and 12" );
        lua_error( L );
        return 1;
    }
and then recompile if that is an option for you...

Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: Mapper In/Out Exit Stubs

Post by Jor'Mox »

Thanks. I opted to store the data related to in/out exit stubs in room user data, and made it work that way. That way, I don't have to push out a modified version of Mudlet to the people who want to use the script successfully. I look forward to a more polished release where I can take out my work arounds and just use the built in functions for things like exit stubs, doors, and such.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Mapper In/Out Exit Stubs

Post by Vadi »


Post Reply