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
raviden
Novice


Joined: 02 Nov 2010
Posts: 45

PostPosted: Sun Nov 27, 2011 1:24 pm   

Huge subbing question.
 
Hey,

Let's say I have giant (SQL) database of characters. I have their short description, their names and name of guilds they're part of. How should I make subbing text from MUD so it would be most efficient?
For example, most simple would be:

#trigger {({@character_short_or_name})} {$sub = @substitute_database.%1; #SUB $sub}
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Nov 28, 2011 4:56 pm   
 
I'm not sure you can make it more efficient than that, except that you could use @substitute_database in the trigger pattern instead of @character_short_or_name.
Reply with quote
Adrone
Newbie


Joined: 01 Dec 2011
Posts: 2

PostPosted: Thu Dec 01, 2011 6:31 pm   
 
Wouldn't this work?

#sub %db( @substitute_database, %1) %2
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Dec 01, 2011 9:25 pm   
 
Well, as far as we know, there is no %2. But yes, you could use the %db() function instead of the shorthand @substitute_database.%1. But it won't really be any more efficient. It's just a different syntax for the same thing.
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