Conditional variable with different type of question

Hello everyone, I need your help. I want to create an eligibility variable based on responses to previous questions. All questions are answered as 1=Yes, 2=No, except for the age question. My syntax is as follows:
(scr1_diarrhea_yn_201 == 2 &&
scr1_antibiotics_yn_202 == 2 &&
scr1_probiotics_yn_203 == 2 &&
scr1_plw_steroids_yn_204 == 2 &&
scr1_nsaids_yn_205 == 2 &&
scr1_fast_plan_yn_206 == 2 &&
scr1_leaving_area_plan_yn_207 == 2 &&
scr1_plw_capsule_CI_yn_208 == 2 &&
scr1_in_other_trial_yn_209 == 2 &&
scr1_family_trial_yn_210 == 2 &&
scr1_VE8184_allergy_yn_211 == 2 &&
scr1_immunocompromise_yn_212 == 2 && scr1_chronic_digestive_d_yn_213 == 2 &&
scr1_immunocompromise_yn_214 == 2 &&
scr1_anemia_yn_217 == 2 &&
scr1_security_eval_dif_219 &&
scr1_age_218 >= 18 && scr1_age_218 <= 49) ? 1 : 2
and I’m encountering an error:operator && cannot be applied to operands bool and int". Thank you

Looks like your typo to me:
image

Also, to simplify and avoid this kind of issue you could have used CountValue() function:

(CountValue(2, scr1_diarrhea_yn_201, scr1_antibiotics_yn_202,…)==15) && (scr1_age_218.InRange(18,49))

See also a reference for operator precedence when working with complex logical expressions.