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
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Wed Feb 08, 2006 2:11 am   

Database syntax question
 
This statement works:

#if (%null( @MOB_Ranks_Text.<@converted_name>)) {#addkey MOB_Ranks_Text @converted_name "%2"}

But the editor thinks that it doesn't and flags it as an error. Basically I am converting the long name of a mob to a name with "_" instead of spaces. The <> around the variable seem to get it to do the right thing and it works, but like the said the editor hates it.

Is that the correct way to do that or is there a more eloquent way to do it?

-Reed
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Feb 08, 2006 3:30 am   
 
You could probably use %db() to get rid of the error without fundamentally changing your code:

%null(%db(Mob_ranks_test, @converted_name))

Unless, of course, %null() works differently and doesn't expand/evaluate the %db() function.

My guess is that the editor is thinking the <> is some sort of MXP type of thing, which to make it legal you'd have to use the quote character on it (which you can't do because you were trying to force expansion.)
_________________
EDIT: I didn't like my old signature
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Wed Feb 08, 2006 6:34 pm   
 
That worked great. Only comment is that the Mob_ranks_text needs an @ symbol before it for it to work.

Thanks!
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