161488303349 Posted May 6, 2012 Share Posted May 6, 2012 yesterday i made a big mess with attached media seems like. i made a jira about it and hope will be oki been going thru all my stuff to see if the problem maybe was caused by something else somehowi not want to muddy up the jira if has nothing to do with what happenedwhen i flew from one sim to another the script said: cant resolve/know who is the ownersomething like that. dont know exactly bc i crash straight after. when i relog then no errorso i just wants to know if anyone knows what happens if get this error? like if it doesn't know who it is asking permissions from then what happens? like can it make a leak or something? default { state_entry() { llSetTimerEvent(3.0 + llFrand(30.0)); } timer() { if(!(llGetPermissions() & PERMISSION_TRIGGER_ANIMATION)) llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); else llStartAnimation("express_smile"); llSetTimerEvent(3.0 + llFrand(30.0)); } } Link to comment Share on other sites More sharing options...
Ron Khondji Posted May 6, 2012 Share Posted May 6, 2012 I think your viewer lost it´s connection to the servers when you crossed the simborder. Then as the script, that runs in the viewer, wanted to check the permissions it couldn´t find the assetservers and gave the error. Soon after that the viewer noticed it lost the connection and crashed. I might be wrong though. Link to comment Share on other sites More sharing options...
Lucinda Bulloch Posted May 6, 2012 Share Posted May 6, 2012 When you appear in a sim after tping, or flying it takes a second or 2 for the sim to get all the AV details, I have found that it can be any time from 2 to 4 seconds, depending on lag, my arena looks at script memory used by people tping in, I have to put a 4 second delay, because if I try to look after the av count of the sim has changed I get a zero for script even if I have a key, I did a day of testing to make sure it was not my error, I found that it takes a second or 2 to get all the AV's info in place. Link to comment Share on other sites More sharing options...
PeterCanessa Oh Posted May 6, 2012 Share Posted May 6, 2012 Pleas see: http://community.secondlife.com/t5/LSL-Scripting/Linking-unlinking-primitives-while-asking-for-permission-only/m-p/1519213/message-uid/1519213#U1519213. Always check whether permissions have been granted or refused in run_time_permissions(). As Lucinda said, it can take a while after a TP or region-crossing. run_time_permissions() should accommodate that most of the time (can't stop all SL crashes ^^), whereas your timer delay was probably, randomly, too fast. @ Ron - scripts don't run in the viewer. Link to comment Share on other sites More sharing options...
Innula Zenovka Posted May 6, 2012 Share Posted May 6, 2012 Further to Peter's advice, I think you would solve a lot of problems -- and also be slightly kinder to the sim -- if you had a global variable, "wearer", and then do something like this run_time_permissions(integer permissions) { if(permissions & PERMISSION_TRIGGER_ANIMATION){ llStartAnimation("express_smile"); llSetTimerEvent(3.0 + llFrand(30.0)); } } timer() { if(llGetPermissions()&PERMISSION_TRIGGER_ANIMATION){ llStartAnimation("express_smile"); llSetTimerEvent(3.0 + llFrand(30.0)); } else{//need to ask for them again llRequestPermissions(wearer,PERMISSION_TRIGGER_ANIMATION); } } There is, after all, no need to keep on checking who owns the attachment while it's being worn. Simply give "wearer" a value in the attach event, which is where you ask for animation permissions for the first (and, normally, the only) time. 1 Link to comment Share on other sites More sharing options...
161488303349 Posted May 7, 2012 Author Share Posted May 7, 2012 thanks everyone (: yes can see now what happens when the timer goes to fast + innula, can see how your way is better. so i will change to that way if is ok if i add a stoptimer in the timer event (like i done below) then when the getperms fails then the timer stops yes? and it never starts again until is restarted in runtime_permissions yes? timer(){ if(llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) { llStartAnimation("express_smile"); // change time to 30.0 to make go slower llSetTimerEvent(30.0 + llFrand(10.0)); } else { //need to ask for them again // stop timer so only goes again when perms actual granted llStopTimerEvent(0.0); llRequestPermissions(wearer,PERMISSION_TRIGGER_ANIMATION); }} Link to comment Share on other sites More sharing options...
Innula Zenovka Posted May 7, 2012 Share Posted May 7, 2012 Yeah.. that's a better idea. Stop the timer if you lose permissions for whatever reason, and then start it again when you've regained them. Link to comment Share on other sites More sharing options...
161488303349 Posted May 7, 2012 Author Share Posted May 7, 2012 woohoo!! cool. thanks again (: Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now