|
| 23 Aug 2014 07:20 PM |
Instead of doing
function poop() coroutine.resume(coroutine.create(function() end)) end
poop()
How would I be able to do that without creating two functions? |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Aug 2014 07:50 PM |
| anonymous functions automatically execute |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2014 08:00 PM |
| ... I don't want to make two functions, I want to combine the coroutine and the function poop() together. |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2014 08:04 PM |
omfg
"anonymous functions automatically execute"
I was saying only use the coroutine noob
|
|
|
| Report Abuse |
|
|
|
| 23 Aug 2014 08:07 PM |
Oh I get it call me a noob because I didn't understand what you where saying..
Also I don't understand what you mean
Do you mean this..?
local fart=coroutine.create(function() print('hi') end)
coroutine.resume(fart()) |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2014 08:07 PM |
| Why are you naming your functions poop and fart. |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2014 08:10 PM |
| Because I'm not creative in my example names. |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2014 08:13 PM |
coroutine.resume(coroutine.create(function() --code end)
^ will automatically execute |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2014 08:14 PM |
| I said it was an example I want to call the function from different spots... |
|
|
| Report Abuse |
|
|