Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
hogarius
Adept


Joined: 29 Jan 2003
Posts: 221
Location: islands.genesismuds.org

PostPosted: Sat Sep 03, 2011 3:51 pm   

[3.34] Database issues
 
I play Simutronic's Modus Operandi. I use a CMUD database (not the newly-implemented SQLite database) to help me track and capture perpetrators that have wanted posters tacked to several bulletin boards around town.

Several aspects of the database seem to have broken for me after I upgraded to CMUD version 3.34.


1. When I open the database, I must use the #DBONLINE command to be able to populate the database. I guess this is new in 3.34? Also, I am unable to include this command in my alias that opens the database; I must remember to type it into the command line every time I play MO and open the database.


2. When I read the bulletin boards, a trigger automatically extracts the details for each perp and populates the database. However, the query that checks for posters I've already read is no longer working, and I end up posting duplicate perp records in my database. Please see the script below.

Code:
Duplicate = %query(&FirstName = @Perp.FirstName && &LastName = @Perp.LastName && &Weight = @Perp.Weight)
#if @Duplicate {#dbput @Duplicate {Location = @Perp.Location}}
#if !@Duplicate {#new Perps @Perp}


I know the @Perp database variable is being populated. In fact, a new record for every poster is being added to the Perps database. What I want to happen, however, is for only the Location field to be updated in the already existing database record if I've already read the poster for that perp. With the present script, the @Duplicate variable, which should contain the record numbers for a previously-read poster, is always empty.

I also know that my %query() function requires (or used to require) quote marks in it, and also probably needs some more parentheses, but when it wasn't working, I piddled with the script and screwed it up. Confused

(I have several other %query() functions in various triggers that also seem not to be working. If I can get this one working, I can apply what I learned to the other %query() functions as well.)


I would appreciate any advice anyone can give.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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