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
hpoonis2010
Apprentice


Joined: 18 Jun 2019
Posts: 141

PostPosted: Sat Feb 20, 2021 9:00 am   

#FIND and Mapper
 
The documentation for FIND states:

"In the second command format (without parameters), it finds the current location on the map. Issues the MUD Look command and compares the current MUD room description with the map database and sets the map location to the matching room. "

FIND does not work like 'find all rooms with name x in zone y'...

... is SQL-ing the mapper db file the only recourse?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4317
Location: Pensacola, FL, USA

PostPosted: Tue Feb 23, 2021 2:11 am   
 
If there is more than one matching room, that is the case, yes.
_________________
Discord: Shalimar#3679
Reply with quote
hpoonis2010
Apprentice


Joined: 18 Jun 2019
Posts: 141

PostPosted: Tue Feb 23, 2021 2:13 pm   
 
OK.

The main session file I open in sqlite DB Browser app.

I can filter using the 'Browse Data' box in the tool and it auto-generates a query:
(it was an extreme amount of more complicated by I trimmed it down to the bare minimum)
Code:
SELECT "_rowid_",* FROM "main"."ObjectTbl" WHERE ("Name" LIKE "A Long Hallway") ;


Which returns:

Code:
ObjId   Name                  ZoneID
21181   A Long Hallway            206
10031   A Long Hallway            119
10045   A Long Hallway            119
10048   A Long Hallway            119
10051   A Long Hallway            119
28979   A Long Hallway            196
18995   A Long Hallway            130
27755   A Long Hallway            130
18987   A Long Hallway            130
27752   A Long Hallway            130
27753   A Long Hallway            130
18986   A Long Hallway            130
27751   A Long Hallway            130
18977   A Long Hallway            130
27742   A Long Hallway            130
19560   A Long Hallway            138
28413   A long hallway            190
28414   A long hallway            190
28415   A long hallway            190
28426   A long hallway            190
28427   A long hallway            190
20661   A Long Hallway            243
20663   A Long Hallway            243
20666   A Long Hallway            243
20668   A Long Hallway            243
31584   A Long Hallway            270
31545   A Long Hallway            270
31585   A Long Hallway            270
31544   A Long Hallway            270
31588   A Long Hallway            270
3119   A Long Hallway            71
3120   A Long Hallway            71
3123   A Long Hallway            71
19623   A long hallway            220
19624   A long hallway            220
19625   A long hallway            220


The documentation for %sql: %sql(name, sql-string)

The example in the docs and this reply from Rahab http://204.209.44.89/forums/viewtopic.php?t=37987 both state:

(eg)
#SQLDB testing.db

Filename immaterial? As zugg docs claim that the DBs are sqlite but yet have different filename suffixes (.db and .dbm). Is 'name' an arbitrary name or the non-suffixed part of the filename? - both examples use filename and 'name' as the same thing.

In reality, my query would want to pull all rooms whose name matches the name string and whose zoneID matches the zone I am interested in. I was not sure how I could test this out in the DB Browser thing as rooms are in ObjectTbl and zones are in ZoneTbl. I am not a DB-er so am not sure how

SELECT row FROM dbfile.dbm.ObjectTbl WHERE 'Name=A Long Hallway' AND ZoneID=125

translates to cmud's sql-ishness. Or even

SELECT $row FROM dbfile.dbm.ObjectTbl WHERE Name=$name AND ZoneID=$zone
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