Function cannot read property but other function can?

I’m going to add a post to your other thread. I think it is more relevant to the questions you have.