Jump to content

Death of hack


Void Singer
 Share

You are about to reply to a thread that has been inactive for 4604 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

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

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

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

You are about to reply to a thread that has been inactive for 4604 days.

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
 Share

×
×
  • Create New...