Crash on compiling custom blueprint node in constructionScript

i have been looking at the addComponentFunction but like i said i find it very hard to follow and understand because of all the stuff to do with templates and engine and blueprint helper functions, and i cant seem to pinpoint where it actually is that you tell it what component you wish to make and then it seems like you use a different method to actually make the component

UActorComponent* NewActorComp = TemplateData ? CreateComponentFromTemplateData(TemplateData) : CreateComponentFromTemplate(Template);