Minor but annoying problem with locals. I have a long variable list that I would like to add to a file with the following code. I keep on getting errors for invalid syntax and too few variables specified. I have not been able to find a fix to the code. Any suggestions

local vars "site_visits_with_case_worker Indoor_Bathroom Porta_Potty washing_Station ADA_Compliant_Shower"

local num: word count `vars'

foreach i in 1/`num' {
local temp `: word `i' of `vars''
di `temp'
gen `temp' = .
}