Ugh. What does the error say after #1010? Errors aren't just obstacles to get around, they are clues as to the nature of the problem.
I Googled your error number, and it's apparently, "A term is undefined and has no properties." So your next step is find out which term is undefined, "dude" "dude.target" or "building_MC" then check the places where you thought you were defining them, etc.