Skyrim Modding: How to Use MACFKit to Make a Custom Voiced Follower
i've found the best way to avoid the 'getactorref is not a function or does not exist' error is to make sure the dialogues your followers give are the same dialogues you are giving them, and that they're always in the right order. i've found that if i have a follower give an npc a dialogue first, and i give the same dialogue to that npc, but with different words, then when the npc gives the dialogue it will fail because they're not the same dialogue, even though they're both from the same dialogue kit (ie. are the same questions and answers).
skyrim make a follower kit
if you're using the script, you'll need to make sure you are in the right cell. i don't believe there's any way to make it load your cell, but if you have the dialogues separated into different cells, you can just load the right one for the cell you're in. and you'll need to make sure you put your follower npc in the right cell, too. if you're not using the script, that's another matter. since the dialogues are separated into cells, if you want to use the dialogues in your mod you'll have to load all of the cells. once you do that, you can place your follower npc in the cell that's right for your dialogues and the script should work.
well, i think i can get most of it working. i have a follower npc who'll talk to my target npc if they're in a specific cell. i'm getting the script errors, because i believe i can only edit dialogues in a cell that's a part of the mod's cell space. i've only loaded a few cells so far. i'm not going to post the exact script, because i'm not entirely sure what i'm doing, but i'll give you the basics.