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


Joined: 01 Jan 2003
Posts: 32

PostPosted: Sun Apr 18, 2004 8:56 pm   

DB HELP
 
I started this alias to search for keywords in certain fields and than have a list of the names of the mobs to show up, but instead of showing the names of the mobs it shows #.d (1.d 2.d) anyone know what is wrong?


#ALIAS itemget {#VARIABLE itemsfound %find( "%1", %2)
)
#VARIABLE itemname %rec.name _nodef idsay
#DBGET %pick( "p:Select item", "o:1", "@itemsfound %rec.name")
#VARIABLE itemdesc %rec.desc _nodef idsay
#VARIABLE itemplane %rec.plane _nodef idsay
#VARIABLE itemshortdesc %rec.shortdesc _nodef idsay
#VARIABLE itemlvl %rec.level_nodef idsay
#VARIABLE itemeq %rec.eq _nodef idsay
#VARIABLE itemarea %rec.area _nodef idsay
#VARIABLE itemroom %rec.room _nodef idsay
#ECHO You have chosen ~"%rec.name~" as your item.
#SHOW @itemname
#SHOW @itemdesc
#SHOW @itemplane
#SHOW @itemshortdesc
#SHOW @itemlvl
#SHOW @itemeq
#SHOW @itemarea
#SHOW @itemroom}
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Sun Apr 18, 2004 10:12 pm   
 
A couple of typos

#ALIAS itemget {#VARIABLE itemsfound {%find( "%1", %2)}
#VARIABLE itemname {%rec.name} _nodef idsay
#DBGET %pick( "p:Select item", "o:1", "@itemsfound %rec.name")
#VARIABLE itemdesc {%rec.desc} _nodef idsay
#VARIABLE itemplane {%rec.plane} _nodef idsay
#VARIABLE itemshortdesc {%rec.shortdesc} _nodef idsay
#VARIABLE itemlvl {%rec.level} _nodef idsay
#VARIABLE itemeq {%rec.eq} _nodef idsay
#VARIABLE itemarea {%rec.area} _nodef idsay
#VARIABLE itemroom {%rec.room} _nodef idsay
#ECHO You have chosen ~"%rec.name~" as your item.
#SHOW @itemname
#SHOW @itemdesc
#SHOW @itemplane
#SHOW @itemshortdesc
#SHOW @itemlvl
#SHOW @itemeq
#SHOW @itemarea
#SHOW @itemroom}
Reply with quote
Samus
Novice


Joined: 01 Jan 2003
Posts: 32

PostPosted: Mon Apr 19, 2004 5:02 am   
 
heres another question
when I type #ALIAS itemget {#SHOW %find (%1,%2)}
is there anyway that it can show the name of the item instead of showing 1.d?
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Mon Apr 19, 2004 4:33 pm   
 
Try: #alias ItemGet {#show %dbget(%find("%1",%2))}
Reply with quote
Samus
Novice


Joined: 01 Jan 2003
Posts: 32

PostPosted: Mon Apr 19, 2004 7:42 pm   
 
That doesn't display anything on the screen
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Mon Apr 19, 2004 8:27 pm   
 
err, try this:
#alias ItemGet {#show %db(%dbget(%find("%1",,%2)),Name)}

It will search the current Database view for an entry containing %1 in field %2, and return the name of the first matching entry.
Reply with quote
Samus
Novice


Joined: 01 Jan 2003
Posts: 32

PostPosted: Tue Apr 20, 2004 12:06 am   
 
well anyone for it to work with my alias?
so it will have a list of all the keywords?
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