Level: Beginner
Trying to write an .ado file. This is how it looks.

When I was debugging this line by line, I am getting 2 errors.:
1. xc, invalid name, r(198)
2. y' invalid name, r(198)
When I delete (`xc'==`k'), error #1 disappears and when I remove the extra " ' " after y in scalar asf = (`y''*ind), error #2 goes away. However, both the conditional check and finding the transpose of y are crucial to my code. How do I get rid of these errors?

program func, rclass
version 15.1

syntax varlist(numeric min=4 max=4), i(integer) j(integer) k(integer)
args y xa xb xc

//indicator
gen ind = (`xa' == `i')*(`xb' == `j')*(`xc'==`k')

//some calculations
qui sum ind, det
scalar asf = (`y''*ind)

return scalar asf = asf
return scalar I = `i'
return scalar J = `j'
return scalar K = `k'

drop
ind

end