Float Function DistanceBetween(Objectreference A,ObjectReference B) global ; Returns the distance between 2 objectreferences return Sqrt((A.Z-B.Z)*(A.Z-B.Z)+((Sqrt((A.X-B.X)*(A.X-B.X)+(A.Y-B.Y)*(A.Y-B.Y)))*(Sqrt((A.X-B.X)*(A.X-B.X)+(A.Y-B.Y)*(A.Y-B.Y)))))endfunction
But in another script, when I try to save, it gives me this error:
FollowObjectTracker.psc(28,14): DistanceBetween is not a function or does not exist
But, (and here's the kicker), if I change the call to Tvar.DistanceBetween (Tvar is the global variable access prefix I defined) I then get THIS error:
FollowObjectTracker.psc(28,19): cannot call the global function DistanceBetween on the variable ::TVar_var, must call it alone or on a type
Ok...so it's definitely a global function, and should therefore be accessable from any script anywhere in my mod...and it's definitely seeing it if I try to call it directly, because it doesn't like doing that with global functions.
So what in the name of Sheggorath is going on? This same function was working in the same script last night...all I did was get rid of a few Debug.Notification() calls...
