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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Ashur
Novice


Joined: 25 Jul 2011
Posts: 39

PostPosted: Wed Apr 11, 2012 4:10 pm   

Issues with %numitems
 
I've got a string list that contains the current path I'm killing along. After moving to the next room (%pop), I want to display the number of rooms left. I tried:

#SAY %numitems(@currentkillpath)
#SHOW %numitems(@currentkillpaht)

But both of those show something like:

0 enter tent|out;s|enter tent|etc, etc, etc

If I do just:
%numitems(@currentkillpath)

It sends the number remaining as a command to the MUD, which I don't want.

How can I get this to display properly?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4672
Location: Pensacola, FL, USA

PostPosted: Wed Apr 11, 2012 5:28 pm   
 
in your #SHOW you typo'd the variable name... other then that, i really dont see any error
_________________
Discord: Shalimarwildcat
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Apr 11, 2012 10:06 pm   
 
Are the variables set to "sting list" instead of "literal"?

If %pop is working, then the %numitems should work, too... weird if it's not, however.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Apr 12, 2012 2:20 am   
 
Could you cut and paste the actual output of the command, and the content of the variable, within [code]...[/code] tags? Your typed description appears to have typos which make it hard to diagnose. For instance, the stringlist output contains both | and ; which I doubt is correct. We need to see accurate information.
Reply with quote
Ashur
Novice


Joined: 25 Jul 2011
Posts: 39

PostPosted: Thu Apr 12, 2012 2:43 pm   
 
Well, I started to type up everything and when I tried "#SAY %numitems(@currentkillpath)" in the command line it displayed the proper thing (the number of items remaining in variable, not sent as a command). I don't know what changed since I tried it yesterday though. I know there were typos in my post, but the post is the only place the typos occurred.

I'll keep an eye on this and see if I manage to reproduce the error I was seeing. My best guess is that the variable had gotten goofed up in some way that wasn't obvious when I was looking at it.

Just to answer the few questions that were asked, the variable is set to 'string list', not 'literal'.

The contents of the variable are simple directions. So, in any given row, the value is as simple as "w" or as complex as "w;se;e;n;nw;s" (to move multiple directions in one %pop). The | were added by the function, presumably to separate each row (so in the example I gave in my original post, "enter tent" was a row, followed by "out;s", followed by "enter tent").

Thanks for the responses and apologies for the typos. I'll respond here again with as much description as possible if I get this again.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion 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