Ok, I have a bug with one of my scripts, the controls never releases. If I click on the release keys button, it disappears, and the object is detacted. But if I detact the object the release keys button never goes away until I log off. Clicking on the release keys button does nothing. Here is a few snipplets of my code, maybe someone out there can help me.
Thank you in advance.
takeControls(integer passOn)
{
llTakeControls(CONTROL_DOWN,TRUE,passOn);
llTakeControls(CONTROL_UP,TRUE,passOn);
llTakeControls(CONTROL_FWD | CONTROL_BACK,TRUE,passOn);
llTakeControls(CONTROL_LEFT | CONTROL_RIGHT,TRUE,passOn);
}
state default
{
run_time_permissions(integer perm)
{
if (perm & PERMISSION_TAKE_CONTROLS)
{
takeControls(TRUE);
}
}
attach(key id)
{
integer perm = llGetPermissions();
if (id != NULL_KEY)
{
if ((perm & PERMISSION_TAKE_CONTROLS) == FALSE)
{
llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS);
}
my_id = id;
} else {
llReleaseControls();
llRequestPermissions(llGetOwner(),0);
}
}
}
Seagel Neville