of     1   

C_Sharper
#183770040Tuesday, February 16, 2016 8:12 PM GMT

So I have a local function inside a local function. Here's why, it has a for loop in it that I don't want to put it in the main function containing the other function for readability. But I don't necessarily need this function for other purposes, so that's why I'm keeping it inside of the first function. Is this inefficient?
CrustyCitation5
#183770420Tuesday, February 16, 2016 8:19 PM GMT

Why would that be inefficient?
C_Sharper
#183770516Tuesday, February 16, 2016 8:20 PM GMT

Just wanted to know input.
CrustyCitation5
#183770723Tuesday, February 16, 2016 8:23 PM GMT

Well no it's not inefficient. Spawn a thread of a thread of a thread that creates a script file that spawns a thread of a thread that spawns 100 threads to handle the for loop in each of those 100 threads forever.
C_Sharper
#183770887Tuesday, February 16, 2016 8:26 PM GMT

Alright.
parkiet3
#183774863Tuesday, February 16, 2016 9:29 PM GMT

Try creating a coroutine in the real script Just this coroutine.resume(coroutine.create(function () --loop here end))
JarodOfOrbiter
#183775293Tuesday, February 16, 2016 9:35 PM GMT

Not as efficient as just declaring it once, most likely.

    of     1