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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
illyism
Wanderer


Joined: 09 Dec 2007
Posts: 58

PostPosted: Mon Jul 21, 2008 1:01 am   

another script problem
 
Code:
#CLASS {barony|actions}
#VAR enlisters {CecilCecilIllyismCecilCecilIllyism}
#TRIGGER {(%w) enlists (%w) fully trained m*n in the Parrius city barracks.} {
  #additem enlisters %1
  #loop %numitems( @enlisters)
  #ADDKEY enlisters {@enlisters} ""
  }
#CLASS 0


so, what I am trying to do:
I want to see how much each person has "enlisted" men in the barracks, by tracking that I want to see it in an data record, but how do I make one from a simple variable?

here's the trigger thing:
Quote:
Parrius Council Actions for Day 21 of this month:
21-7-2008 0:11> Cecil: Cecil enlists one fully trained man in the Parrius city barracks.
21-7-2008 0:13> Cecil: Cecil enlists one fully trained man in the Parrius city barracks.
21-7-2008 1:05> Illyism: Illyism enlists three fully trained men in the Parrius city barracks.
630h, 335m e-

so... I want to change the variable "enlisters" to a data record, this should be easy, but I wasn't able to figure that out,
as you see, if you run this script, you get these square figures
Reply with quote
illyism
Wanderer


Joined: 09 Dec 2007
Posts: 58

PostPosted: Tue Jul 22, 2008 2:18 pm   
 
any solutions? : the short version :
I want to covert a variable to a variable data record
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Tue Jul 22, 2008 3:18 pm   
 
Simple Solution? Concatenate the names of the person doing the enlisting onto the base variable name... Or something along those lines. What you've said so far doesn't make much sense... you don't want to put them into a normal variable then try to change it to a data record, you just want to use a data record to start with.

#VAR %concat("enlisters.", %1") Blah
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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