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?