hogarius Adept
Joined: 29 Jan 2003 Posts: 221 Location: islands.genesismuds.org
|
Posted: Sat Sep 03, 2011 7:33 pm
[3.34] Database issues |
I mistakenly posted the following in the Beta forum. That post can be deleted. I apologize.
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.
(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. |
|