Void Singer Posted September 23, 2011 Share Posted September 23, 2011 a recent update to the wiki page on states noted the death of an old hack...changing states from inside of a user function no longer works. previously you could do this by enclosing the state change inside of an "if" block. this wasn't a very useful hack (although there are a few cases that it made sense in), so if a script using this suddenly stops, you'll know why and how to fix it (rework the logic to trigger the state change after the function returns) Link to comment Share on other sites More sharing options...
Maryld Althouse Posted September 23, 2011 Share Posted September 23, 2011 With the problems I've been dealing with today, this seemed like a fitting place to use this script: integer anger; default { state_entry() { state sarcasm; } } state sarcasm { state_entry() { llSay(0, "Thanks a lot SL..."); while (anger) llSay(0,"GRRR!"); } touch_start(integer total_number) { anger = !anger; } } Link to comment Share on other sites More sharing options...
PeterCanessa Oh Posted September 23, 2011 Share Posted September 23, 2011 lol Erm ... no, I won't say it. ETA: @ below. Really? I only count one. Anyway, I''m still more inclined to say "pseudo-code", I'm in a relaxed mood Link to comment Share on other sites More sharing options...
Void Singer Posted September 23, 2011 Author Share Posted September 23, 2011 oh come on, you know you want to pick it apart.... I count 3 major flaws, two of them fatal to it's expected operation. Link to comment Share on other sites More sharing options...
Maryld Althouse Posted September 23, 2011 Share Posted September 23, 2011 I know, I know - it's Friday, my mind is on other things, and I just typed that out quick. Just smile and enjoy the intent! Link to comment Share on other sites More sharing options...
Void Singer Posted September 23, 2011 Author Share Posted September 23, 2011 nah it's fine, I just know that Peter got the same itch any programmer would reading it =) Link to comment Share on other sites More sharing options...
Kaluura Boa Posted September 24, 2011 Share Posted September 24, 2011 Errr... Can we have an official confirmation on this? A Jira maybe? I have this little function in a script I wrote recently: uuError(string msg, integer fatal){ if (CardLine > -1) { msg = "Notecard line " + (string)(CardLine + 1) + "\n\t" + msg; } llOwnerSay("/me \n\t" + llList2String(["WARNING", "*** ERROR ***"], fatal) + "\n\t" + msg); if (fatal) { state offline; }} It's still working on all server versions available on Agni: Second Life Server 11.09.09.240513 Second Life RC BlueSteel 11.09.16.240906 Second Life RC LeTigre 11.09.16.240954 Second Life RC Magnum 11.09.20.241144 I re-compiled the script and triggered a state change from the function on every server version. Result: It compiles and it works. So... Can anybody confirm? Link to comment Share on other sites More sharing options...
Void Singer Posted September 24, 2011 Author Share Posted September 24, 2011 Rand made the wiki change, so if it isn't already broken, I suspect it will be next roll? ... either that or I've been the victim of psychological warfare Link to comment Share on other sites More sharing options...
Nexii Malthus Posted September 27, 2011 Share Posted September 27, 2011 Link to comment Share on other sites More sharing options...
Void Singer Posted September 27, 2011 Author Share Posted September 27, 2011 Curiouser and curiouser, I see conflicting reports from people saying it texts broken, and kaluura (whom I've learned to trust on testing) says not broke.... I'm beginning to wonder wonder if this just isn't a massive CF of of misreporting 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