imeddiatey following the first click of the switch,it throwsa Stack-Heap Collision Error
script below, any help appreciated
CODE
vector color = <1.0, 1.0, 1.0>;
float intensity = 1.0;
float radius = 10.0;
float falloff = 0.0;
integer channel = 1232;
// do not edit below this line
toggleLight()
{
if (llGetPrimitiveParams([PRIM_FULLBRIGHT, 0]))
{
llSetPrimitiveParams([PRIM_FULLBRIGHT, ALL_SIDES, TRUE]);
llSetPrimitiveParams([PRIM_POINT_LIGHT, 1, color, intensity, radius, falloff]);
}
else
{
llSetPrimitiveParams([PRIM_FULLBRIGHT, ALL_SIDES, FALSE]);
llSetPrimitiveParams([PRIM_POINT_LIGHT, 0, color, intensity, radius, falloff]);
}
}
default
{
state_entry()
{
llListen(channel, "", NULL_KEY, "" );
}
listen(integer a, string n, key id, string m)
{
if ((m == "Touched"))
{
toggleLight();
}
}
}
