|
1. Pennmush Roomparent Bug
|
|
Sun Oct 7, 2007 [3:30 AM]
|
Kmorance
Email not supplied
member since: Oct 7, 2007
|
Reply
|
|
Hello there,
I'm trying to make a room parent, list the exits and contents along the same line. The issue that I am coming across is that when their is more the one exit in the room, it says the error #-1 NO SUCH OBJECT VISIBLE However, if their is just one exit, then it list just fine. I don't understand why the room parent can not see the exits.
[align(15 45 <15, [iter( [lvexits(%L)], [ansi(r,[name(##)])] %B \<[ansi(hc,[before ([after([fullname(##)],\;)],\;)])]%R,|,)], ,[iter(%1,itext(0)%R,|,)])]
Any help would be quite dandy, thank you in advance.
(Comment added by Kmorance on Sun Oct 7 4:37:04 2007)
Also, this string is on the conformat attribute of the room parent.
|
|
|
|
|
2. RE: Pennmush Roomparent Bug
|
|
Sun Oct 7, 2007 [2:47 PM]
|
Idealiad
Email not supplied
member since: Jan 16, 2006
|
In Reply To
Reply
|
|
My first thought for your error is that you're missing a space somehow between your returned dbrefs. So, with one exit you would be fine, but two objects would return like #1#2, rather than #1 #2, and return the object not found. Have you tried setting the object debug and following the trace?
Though I admit from skimming your code I don't immediately see where this would happen.
Also I would recommend removing all unnecessary brackets. In general you only need brackets where the preceding function would get confused if there wasn't one. However if there already is a delimiter, such as a comma, separating the two functions, a bracket is just extra visual and computational overhead.
A very simple example of what you want:
@conformat here=
@@ Make a list of comma-separated contents and store temporarily in a register @@
[setq(0,iter(%0, name(itext(0))\,))]
@@ Make a list of exits @@
[setq(1,iter(lvexits(%L), name(itext(0))))]
@@ Ensure the last element of our exit list ends with a period @@
[setq(2,edit(last(%q1),$,.))]
@@ Make sure we remove the last element of the exit list which has a comma, since we already created this element with a period @@
[setq(3,iter(reverse(rest(reverse(%q1))), itext(0)\,))]
@@ Print to the room description @@
Things: %q0 Exits: %q3 %q2
the code blob:
@conformat here=[setq(0,iter(%0, name(itext(0))\,))][setq(1,iter(lvexits(%L), name(itext(0))))][setq(2,edit(last(%q1),$,.))][setq(3,iter(reverse(rest(reverse(%q1))), itext(0)\,))]Things: %q0 Exits: %q3 %q2
(Comment added by Idealiad on Sun Oct 7 15:50:46 2007)
btw, you would probably get more immediate help if you went to either M*U*S*H, or hunted down the WORA forums. TMC is great but not too many mush coders post here.
|
|
|
|
|
3. RE: Pennmush Roomparent Bug
|
|
Sun Oct 7, 2007 [10:20 PM]
|
cratylus
Email not supplied
member since: Feb 1, 2006
|
In Reply To
Reply
|
Kmorance, Starting a new thread is not the proper way to reply to a post. You click on the "Reply" link, as shown in this illustration: http://lpmuds.net/reply.jpgIf you act right away, you might still be able to delete that new thread you created, and reply here, where it belongs. -Crat http://lpmuds.net
|
|
|
|
|