hogarius Adept
Joined: 29 Jan 2003 Posts: 221 Location: islands.genesismuds.org
|
Posted: Wed Mar 03, 2004 6:21 pm
Database Difficulty. |
I use zMUD to play Simutronics' Modus Operandi on a Compaq Presario 7998, 128 MB RAM, AMD Athlon 1.0 GHz Processor. I am trying to extract information from the following text into a database:
>read sign all
[Start Of List.]
Reading a stained card you see:
--==**** Wanted: Clarissa Gosling ****==--
Police are asking for your help to bring Clarissa Gosling to justice for the crime of littering. She appears to be in her early twenties, standing about 6 feet and 4 inches tall with an overweight build. She has an elevated fitness level, with a weight of about 284 pounds. Her skin is fair. Her eyes are violet, and she has silver wild hair.
She was last seen wearing a black wool v-neck shirt, a multicolored retro vinyl go-go minidress, a pair of gray open-toed high heels, and a pair of silver-rimmed glasses.
Clarissa Gosling was recently seen near the Alley in French Quarter.
She is to be considered not at all dangerous.
Reading a soggy poster you see:
--==**** Wanted: Adrienne Davidson ****==--
Police are asking for your help to bring Adrienne Davidson to justice for the crime of money laundering. She appears to be in her late teens, standing about 5 feet and 9 inches tall with an average build. She has a very high fitness level, with a weight of about 185 pounds. Her skin is bronzed. Her eyes are sapphire, and she has fiery red ultra-short hair.
She was last seen wearing a zebra-print tube top, a long skirt with mid-thigh slits, a pair of sleek black and yellow diving fins, and a strand of luminous pearls.
Adrienne Davidson was recently seen near the Alley in French Quarter.
She is to be considered not at all dangerous.
Reading a ugly poster you see:
--==**** Wanted: Wilbert Johnson ****==--
Police are asking for your help to bring Wilbert Johnson to justice for the crime of shoplifting. He appears to be in his late forties, standing about 5 feet and 0 inches tall with a trim build. He has a very low fitness level, with a weight of about 140 pounds. His skin is ruddy. His eyes are emerald green, and he has peppered stylish hair.
He was last seen wearing a black and yellow basketball jersey, a pair of tattered cutoff jean shorts, a pair of goofy pink elephant slippers, and a tanned leather belt.
Wilbert Johnson was recently seen near the Kiosque.
He is to be considered not at all dangerous.
Reading a shiny card you see:
--==**** Wanted: Andie Clemens ****==--
Police are asking for your help to bring Andie Clemens to justice for the crime of pimping. She appears to be in her mid twenties, standing about 6 feet and 1 inch tall with an average build. She has an elevated fitness level, with a weight of about 194 pounds. Her skin is dark. Her eyes are blue-green, and she has dirty blonde shoulder-length hair.
She was last seen wearing a sky-blue tank-top with thin straps crisscrossed in back, a natty grey knee-length twill skirt, a pair of strappy sandals with wood wedge bottoms, and a floppy black beret.
Andie Clemens was recently seen near The Square in French Quarter.
She is to be considered not at all dangerous.
Done!
This is the trigger I use to extract the information:
#TRIGGER "BoardInfo"
{^Police are asking for your help to bring &{Perp.FirstName} &{Perp.LastName} to justice *. &Perp.Pronoun appears to be in %w &Perp.AgeRange &%w{Perp.AgeDecade}, standing about &%d{Perp.HFt} feet and &%d{Perp.HIn} inch* tall with %w &Perp.Build build. %w has %w &{Perp.Fitness} fitness level, with a weight of about &%d{Perp.Weight} pounds. %w skin is &{Perp.SkinTone}. %w eyes are &{Perp.EyeColor}, and %w has &Perp.Hair hair.}
{#if (@Perp.Pronoun = "He") {Perp.Gender = "M"} {Perp.Gender = "F"};
#if (@Perp.AgeDecade = "teens") {Perp.AgeNum = "10's"};
#if (@Perp.AgeDecade = "twenties") {Perp.AgeNum = "20's"};
#if (@Perp.AgeDecade = "thirties") {Perp.AgeNum = "30's"};
#if (@Perp.AgeDecade = "forties") {Perp.AgeNum = "40's"};
#if (@Perp.AgeDecade = "fifties") {Perp.AgeNum = "50's"};
#if (@Perp.AgeDecade = "sixties") {Perp.AgeNum = "60's"};
#if (@Perp.AgeDecade = "seventies") {Perp.AgeNum = "70's"};
#if (@Perp.AgeDecade = "eighties") {Perp.AgeNum = "80's"};
#if (@Perp.AgeDecade = "nineties") {Perp.AgeNum = "90's"};
#new Perps @Perp}
#COND {^* was recently seen &{Perp.Location}.$} {#dbput Perps %rec {Location = @Perp.Location}}
#COND {^%w is to be considered &{Perp.ThreatLevel}.$} {#dbput Perps %rec {ThreatLevel = @Perp.ThreatLevel};#dbput Perps %rec {FirstName = @Perp.FirstName}}
My problem is that the FirstName field in the Perps database always ends up having the same contents as the Pronoun field. It seems to be a timing issue, because if I add #WAIT commands, it changes the results, but unconsistently and unsatisfactorally. Also, #WAITs cause the trigger to miss an upcoming Perp Notice, since several Perp Notices are on the bulletin board in the game at the same time.
The @Perp variable seems to be correct:
@Perp = FirstNameAndieLastNameClemensPronounSheAgeRangemidAgeDecadetwentiesHFt6HIn1BuildaverageFitnesselevatedWeight194SkinTonedarkEyeColorblue-greenHairdirty blonde shoulder-lengthGenderFAgeNum20'sLocationnear The Square in French QuarterThreatLevelnot at all dangerous
However, in the Perps database, the FirstName field shows up as He or She, according to whatever is in the Gender field for the current record.
I've also tried using the #NEW command at the very end of the trigger, and also writing each field individually:
#DBPUT Perps %rec {FirstName="@Perps.FirstName|Last Name=@Perps.LastName|...
...but I get the same results.
Any suggestions would be greatly appreciated.
Thanks.
Hogarius |
|