Movement issues with Doer

Heya all, I’m getting an issue with Doers I cannot solve for the life of me.

take this setup:

upRoom: Room 'Above'
    "a room"
    down = Forest
;

Forest: Room 'Towering Trees'
    "A generic forest"
    up = upRoom
;


+tree: Thing 'Tree;;Trees'
    isfixed = true
;

Doer 'climb tree'
    exec(curCmd)
    {
        doInstead(Go, upDir);
        
    }
;

This will fail

This issue seems exclusive with Doers, oddly using doInstead/goInstead outside of a doer works with movement just fine. The error returned is:
‘nil object reference’
and then points to this code in the action.t file of the adv3lite library

if(loc.propType(direction.dirProp) == typeObject)
local conn = loc.(direction.dirProp)
getOutOfNested(conn)

but while Doers give this issue, this for example will work (assuming this is defined for the tree object):

   dobjFor(Climb)
    {
       
     action() 
        {
            doInstead(Go, upDir);
        }
        
    }

I’ve been trying to figure out the issue for over an hour and just can’t, any help would be appreciated, it’s not a big deal as there’s many ways to accomplish the same task of course, but I’d like to know if I’m missing/misunderstanding something.

3 Likes

You haven’t misunderstood. This is a bug that’s crept into the library somehow. Unfortunately, fixing it for the Doer case breaks it for the dobjFor(Climb) case so I’ll have to come back and take a more thorough look at it.

4 Likes

Ah, okay! Thank you for clearing that up, appreciated.

I’ve now fixed this in the library and uploaded the fix to GitHub.

6 Likes