It seems that I wasn't clear in my question.
What I want is the code to produce the error message like in the picture below
error message
-
blumski
- Posts: 37
- Joined: May 7th, 2018, 7:02 am
error message
You do not have the required permissions to view the files attached to this post.
Last edited by blumski on May 9th, 2018, 5:13 pm, edited 1 time in total.
-
sah
- Posts: 97
- Joined: May 28th, 2015, 3:16 pm
Re: error message
Below is a sample for your perusal
//Parent's age should be 12 years more than child's age.
if Relationship(curocc()) = 4 and Age(1) < Age(curocc()) + MinAgeDiffBtwnChildAndParent then
errmsg("%s's age should be 12 years more than %s's age",strip(Name(1)),strip(Name(curocc())))
select("Correct parent's age",Age(1),"Correct child's age",Age(curocc()));
-
aaronw
- Posts: 571
- Joined: June 9th, 2016, 9:38 am
- Location: Washington, DC
Re: error message
In addition to what sah said take a look at the errmsg function. The use of errmsg and select together will give you the behavior you want.
-
blumski
- Posts: 37
- Joined: May 7th, 2018, 7:02 am
Re: error message
Thanks so much sah. It works.