Set rActor to GetFirstRef 69 Label 10 If rActor.GetInSameCell Player == 1 Set fDistanceFrom to rActor.GetDistance Player PrintC "NPC %n Distance %.2f", rActor, fDistanceFrom Set rActor to GetNextRef GoTo 10 EndIf
I've narrowed it down, through trial and error, to the functions GetFirstRef andf GetNextRef.
If those functions are present in my script, CTD. If they aren't present, no problems.
I'm quite the noob. Is there something I'm not doing that is causing the CTD?