Unable to generate code pt.2

This has been broken since May(maybe earlier) as there have been other tickets asking for help about this.

No matter the flavor I pick I get an error. With all the errors we as users have experienced in the past few months. This should be a function that works, I want to have backups of the work I’ve done previously as right now everything is up in the air as far as stability is concerned.