According to supportInfo and the ingame help waypointAttachObject supports 2 syntaxes:
["b:ARRAY waypointattachobject SCALAR,OBJECT"]
The waypointAttachObject syntax which is using a Number (objectID) as the 2nd argument is not working - waypointAttachedObject returns a null-object (and a subsequent setWaypointHousePosition won't work, too).
Example:
on Stratis at the airport
wp = group player addWaypoint [[1907.5,5746.5,0.00144196],0];
wp waypointAttachObject 66220;
hint str (waypointAttachedObject wp);
hint shows Null-Object
But when using the alternative syntax (object as 2nd argument):
on Stratis at the airport
wp = group player addWaypoint [[1907.5,5746.5,0.00144196],0];
wp waypointAttachObject ((waypointPosition wp) nearestObject 66220);
hint str (waypointAttachedObject wp);
hint shows 23e27900# 66220: miloffices_v1_f.p3d
so
wp waypointAttachObject 66220
should just get evaluated as
wp waypointAttachObject ((waypointPosition wp) nearestObject 66220)
or if this syntax (Id as 2nd argument) isn't supported anymore the documentation/supportInfo/ingame help should get updated. {F23725}