vector GetRootPos() { // If this object is not linked, or if it is the // root object, just return llGetPos() integer LinkNum = llGetLinkNumber(); if (LinkNum <= 1) return llGetPos(); // Otherwise take local position into account. return llGetPos() - llGetLocalPos(); }
Changed if(LinkNum == 0 || LinkNum == 1) to if(LinkNum <= 1).