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
Kerion
Newbie


Joined: 26 Mar 2001
Posts: 7
Location: USA

PostPosted: Sun Sep 15, 2002 10:41 am   

Whats wrong with this sequence...
 
I have a sequence of triggers/aliases I use to update a DB with my characters info...the sequence is as follows:

Alias recordstats:
#T+ recStats

score


Only trigger in class recStats:
#TRIGGER {Health: (%d)/(%d) Mana: (%d)/(%d)} {

#var currentHp %1
#var maxHp %2
#var currentMana %3
#var maxMana %4
__finishRecord
}


And the __finishRecord alias:
#T- recStats

#dbload acd
#var charRecord %query( &Name = "Kerion", All)
#if (%null( @charRecord)) {
#echo No such character record} {
#dbput @charRecord {Name = "Kerion" | CurrentHp = @currentHp | MaxHp = @maxHp | CurrentMana = @currentMana | MaxMana = @maxMana}
#dbreset
#dbsave
#dbclose
#echo Stat record updated.
}


The database acd exists, all the fields are correct, and a record with the Name 'Kerion' does exist. The variables (@currentHp, @maxHp, @currentMana, @maxMana) do have proper values. Unfortunatley @charRecord is always null (or %null(@charRecord) is always true I should say).

Does anyone see what I am doing wrong here?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Sep 15, 2002 4:52 pm   
 
First, maybe stupid question, do you have the database window open? If you don't then your script would behave as you describe.

Second, I am not sure that "All" is a predefined view. I think it is, but you could try removing it from the query.
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