The video is from 2014 which means alot of the code is way out of date and is likely the cause of the errors. Nearly every addon breaks when an expansion comes out every 2 or 3 years or a new feature is introduced during an expansion.
A quick look at the code you attached and init.lua looks like it may be fine. config.lua could have template frames that no longer exist. Have a look through Blizzards files to see what frames there are. You will find their frames defined for the most part if not all of them in the relative XML file.
https://www.townlong-yak.com/framexml/live
Shared Panel Template definitions - use this to find the names of the frames and their components
https://www.townlong-yak.com/framexm...lTemplates.xml
I would suggest looking at the tutorial section and browsing this site to see what is currently available.
https://wowpedia.fandom.com/wiki/Wow..._customization
Once you have dabbled a bit and got the basics down, try looking for an addon that is simple and similar to what you want to expand on as you learn.
Take a look at their code and see if you can identify portions of it and what they do.
Anything confusing you .. feel free to ask. I am sure between us that we have played with enough of the wow api to be able to offer some advice.