I'm trying to write a program that asks the user for the name of the person whose birthday is today to update his age but I'm getting this error (Missing function declaration for data.)
(deftemplate data
(slot name) (slot height) (slot weight) (slot age) (multislot blood-pressure))
(deffacts s1
(data (name Anna) (height 160) (weight 56) (age 21) (blood-pressure 12 8))
(data (name Jack) (height 180) (weight 82) (age 38) (blood-pressure 19 10))
)
(deffunction ask-q (?question)
(printout t ?question)
(bind ?answer (read))
?answer
)
(defrule r1
(not (starter-state ?))
=>(bind ?answer (ask-q "whose birthday is today?"))
if (lexemep ?answer)
then ?num <-(data (name ?answer)(age ?age)))
(modify ?fact-number (age(+ ?age 1)))
)