|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: 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 |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: 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! |
|
|
|
|
|