Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

TOUCH_INVALID_TEXCOORD not recognised

Tarak Voss
Meanderer
Join date: 14 Oct 2006
Posts: 330
10-24-2008 02:37
I'm running this test script below from Wiki - line 12 "else if (touchedpos == TOUCH_INVALID_TEXCOORD)" comes up with a name not defined in scope - yet TOUCH_INVALID_TEXCOORD is meant to be a LSL constant (I'm using the latest viewer 1.21 I think it is)

"The vector constant TOUCH_INVALID_TEXCOORD has the value <-1.0, -1.0, 0.0>"

anyone else had this problem?



vector touchedpos;

default {

touch_start(integer num_detected) {
integer i = 0;
for(; i < num_detected; ++i ) {
touchedpos = llDetectedTouchST(i);

if (llDetectedTouchFace(i) == -1) {
llWhisper(0, "Sorry, your viewer doesn't support touched faces.";);
}
else if (touchedpos == TOUCH_INVALID_TEXCOORD)
{
llWhisper(0, "Sorry, the surface touch position could not be determined.";);
}
else {
llWhisper(0, (string) touchedpos);
}
} // while ...
} // touch_start

}
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
10-24-2008 03:03
The constant isn't yet enabled on the servers, so we can't use it yet even though the viewer already knows to highlight it.

(Starting with the 1.21 viewer, compilation is done on the server, and what the viewer knows doesn't really matter except to make things pretty in the editor).
Tarak Voss
Meanderer
Join date: 14 Oct 2006
Posts: 330
10-24-2008 03:39
Thanks for that