The following line reports an 'Object number illegal' message:
Print STR$(Object Position X(tobjnum(2)))
where tobjnum(2)=1 and the object definitely exists.
However the following does work:
h=tobjnum(2)
If h=1 then print STR$(Object Position X(h))
or
h=tobjnum(2)
Print STR$(Object Position X(h))
So in effect all I'm doing is subsituting the tobjnum(2) for h.
Any ideas why? Because its bloody infuriating! I've been pulling my hair out for ages over this one!
Cheers
Lee