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
LevelZero
Beginner


Joined: 17 Nov 2006
Posts: 12

PostPosted: Thu Feb 08, 2007 7:07 pm   

[1.24] Paths in aliases outside the default package
 
I stumbled across this odd one since I wanted to make a "Common" package containing various speedwalking paths and aliases for all my characters on a MUD.

If I create an alias that contains a path, this path isn't expanded fully when the alias is inside a different class than the default one.

Example:
I have 2 packages .. Mud-Char1.pkg and Mud-Common.pkg

First off, I create an alias, let's call it 'test1' and place it in Mud-Char1.pkg.
The only thing in it is .ns

If I execute this alias, the resulting output to the MUD will be:
n
s

Now I delete the alias and re-create it in Mud-Common.pkg and execute it. The resulting output is now:
ns

If I create a path called 'path1' with .ns as contents, the above situation occurs again (path1 is correctly interpreted to .ns, irrelevant of the class the path is in .. even when path1 is in a different class as the alias)

For the REALLY weird part ... if I create the alias in Mud-Char1.pkg and then MOVE it to Mud-Common.pkg, it continues working. If I create the alias in Mud-Common.pkg and the move it to Mud-Char1.pkg, it remains inoperable.

I hope I managed to explain the problem .. it's still rather vague to me ...

Addendum: When I then switch to Mud-Char2.pkg which also uses Mud-Common.pkg, the aliases that worked before on Mud-Char1.pkg revert back to non-functional state.

Second Addendum: After switching back to Mud-Char1.pkg, I found out that the aliases don't work there either anymore (the ones in Mud-Common.pkg)
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Feb 09, 2007 7:35 pm   
 
The speedwalking directions require a package that defined the directions. CMUD comes with a package called "English Directions" that contains the default speedwalking directions for English MUDs. You need to make sure that the Module that contains your alias in the Mud-Common.pkg has the English Directions package enabled for it. Click on the Module that contains your alias and you will see a list of enabled packages. There is a wierd bug that sometimes doesn't save this list of enabled packaged correctly, so maybe that's the problem.

The other problem is that moving an alias (or path, etc) currently doesn't tell CMUD to recompile it. So, if it was compiled successfully in a previous package (where the English Directions were defined) and then moved to another module that doesn't have the directions defined, it might continue to work since it wasn't recompiled when it was moved.

You can force an alias to recompile by clicking on the Compiled Code tab within the package editor.
Reply with quote
LevelZero
Beginner


Joined: 17 Nov 2006
Posts: 12

PostPosted: Sat Feb 10, 2007 12:10 pm   
 
Thanks for the reply ..
Indeed, the "English Directions" package wasn't enabled for the Mud-Common.pkg, while it was enabled for Mud-Char1.pkg.

Everything's very clear now :)
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