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
Shezmu
Wanderer


Joined: 23 Apr 2010
Posts: 53

PostPosted: Sun Jul 04, 2010 1:43 am   

Alias to report damage not working
 
I'm still working on a large damage counter that collects all damage I and my groupmates do. I have it collecting the information just fine, and sticking it in several variables.

The following alias should output a report to the grouptell "gt" channel.

Code:

#YESNO "Who would you like to report for?" {Yourself:#VAR DC.reportfor "your"} {Everyone:#VAR DC.reportfor @DCnames} {Partial:#VAR DC.reportfor %pick( p:Who would you like to display reports for?:, @DCnames)};#LOOPDB @you {#var your.%key %eval( %db( @your, %key) + %val)};#var you "";
#FO @DC.reportfor {#addkey %i out "";#FO @dverbshort {#if (%db( @{%i}, %I)) {#var %i.out %concat( %db( @{%i}, out), " ", %I, ~(, ~|c~|, %db( @{%i}, %I), ~|n~|, ~))}};gt Breakdown for %if( %i="your", Myself, %upper( %left( %i, 1))%right( %i, 1)):%db( @{%i}, out)}


What is being output is-
gt Breakdown for Myself:

The relevant variables are populated correctly. The alias above compares damage that I've done with the values in @dverbshort. I'm just looking specifically for any help with everything after the first #FO command. Am I formatting the %db commands correctly?
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Jul 06, 2010 1:29 am   
 
What is the %I? Is that supposed to be the current FOREACH value of the inner loop? If so, the correct reference to the inner loop value should be %j.

I'm afraid I don't have time just now to look deeper at your code, but that's the thing that leaps out at me.
Reply with quote
Shezmu
Wanderer


Joined: 23 Apr 2010
Posts: 53

PostPosted: Fri Jul 09, 2010 10:00 pm   
 
Thanks for looking at it, but I'm going to scrap this code entirely and start over with it. I'm trying to clean up an old script that someone wrote in ZMud, and I just can't quite figure out what he's doing with this stuff.
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