Jump to content
UBot Underground

ferrian226

Fellow UBotter
  • Content Count

    9
  • Joined

  • Last visited

Posts posted by ferrian226

  1. I've read many posts on the topic and still think it could use some explanation or official documentation. I think this is how they work, but would appreciate confirmation.

     

     

    LOCAL VARIABLE IN A:

     

    1. "Define" command/function - stays local and only commands inside this container can interact with the variable's value, unless you pass or return it.

     

     

    2. A 2nd "define" command within another "define" command - even though this 2nd custom command is inside the top "defined" command, the local variables within the top container are not available to the 2nd command unless you pass the local variables into it.

     

     

    3. "thread" command - A local variable set in a thread is not isolated from other threads. A change to a variable in one thread will result in a change for the other threads. Also, the local variable is available to the "parent" container(s).

     

     

    4. "in new browser" command - A local variable set in a thread is not isolated from other "new browsers". A change to a variable in one "new browser" will result in a change for the other threads. Also, the local variable is available to the "parent" container(s).

     

     

    5. "loop" / "loop while" - local variables are not isolated. A local variable's contents in a loop container are not discarded and are available to the parent container(s).

     

     

    6. "if" - local variables are not isolated. A local variable's contents in a "if" container are not discarded and are available to the parent container(s).

     

     

     

    TLDR; Local variables are only local to defined commands.

     

     

    Is this correct?

×
×
  • Create New...