of     1   

Raven5887
#35089704Friday, October 08, 2010 4:52 PM GMT

What is it? O:
zeke505
#35089743Friday, October 08, 2010 4:54 PM GMT

Well, coroutine.create "makes" a new thread and you have to resume it with coroutine.resume. Coroutine.wrap makes a new thread and resumes itself automatically. ...I think.
Raven5887
#35089780Friday, October 08, 2010 4:56 PM GMT

I thought it had something to do with passing arguments
Raven5887
#35089797Friday, October 08, 2010 4:57 PM GMT

OH DISREGARD THAT! "Unlike create, wrap does not return the coroutine itself; instead, it returns a function that, when called, resumes the coroutine. Unlike the original resume, that function does not return an error code as its first result; instead, it raises the error in case of errors."
zeke505
#35089811Friday, October 08, 2010 4:58 PM GMT

Interesting. :O
Raven5887
#35089899Friday, October 08, 2010 5:02 PM GMT

Gotta love lua.org/pil :P
pwnedu46
#35103653Friday, October 08, 2010 9:47 PM GMT

especially when the wiki fails (at everything)
AgentFirefox
Top 100 Poster
#35103866Friday, October 08, 2010 9:50 PM GMT

CoW = coroutine.wrap(function(a, b, c) print("Wrapped coroutine:", a, b, c) end) CoC = coroutine.create(function(a, b, c) print(Created coroutine:", a, b, c) end) CoW(5, 3, 1) coroutine.resume(CoC, 5, 3, 1)

    of     1