Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sun Apr 12, 2009 6:31 pm   

(Fixed) [3.05] %pathfrom doesn't recognize room short names
 
Can %pathfrom be changed to recognize short names as well as the room id?


Last edited by ReedN on Sat Apr 18, 2009 7:16 pm; edited 1 time in total
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Apr 13, 2009 5:16 pm   
 
Every function that accepts a numeric room id value should also accept the short room name value already. Is it not working?
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Mon Apr 13, 2009 7:53 pm   
 
That was my impression of the intended functionality as well. In every case where a numeric ID can be used I can use the short name.

So indeed, the function %pathfrom isn't accepting short room name values, it should be fixed to bring it in line with all the other functions.
Reply with quote
wrym
Magician


Joined: 06 Jul 2007
Posts: 349
Location: The big palace, My own lil world

PostPosted: Mon Apr 13, 2009 8:48 pm   
 
I was testing this, and %pathfrom(vnum) returns null, it will not use the current rooms key if it is omited.

I also check %pathrfrom(roomid,vnum) and %pathfrom(vnum,roomid), they return null as well
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Apr 14, 2009 1:21 pm   
 
My testing shows:
%pathfrom(vnum,vnum) works
%pathfrom(,vnum) works
%pathfrom(shortname,vnum) works

%pathfrom(vnum,) does not work
%pathfrom(vnum,shortname) does not work
%pathfrom(,shortname) does not work

This is probably explained by the following quote from the help file:
Syntax: pathfrom(vNum, ToKey)
The ToKey must always be a Room Key.

So it looks like the first value can be a vnum, a short name, or a blank for current room, but the second value cannot.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Apr 14, 2009 4:49 pm   
 
Yep, Rahab, that is exactly correct. I'll add this to the bug list and allow the second argument to be a shortname or the current room number. Thanks for the detailed breakdown of the problem.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sat Apr 18, 2009 4:11 pm   
 
Confirmed fixed 3.06 (#pathfrom now allows the second argument to contain a room name).
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net