generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Possible error in the ROBLOX wiki?

Previous Thread :: Next Thread 
nrscsy is not online. nrscsy
Joined: 09 Nov 2012
Total Posts: 465
21 Nov 2012 04:14 PM
I'm not entirely sure, but I suspect an error here. The error is at the Beginner's guide to coroutines:

"
running means that the coroutine is currently working and using its code.
dead means that the coroutine has stopped running and is done for now.
suspended means coroutine.yield() ran and it's waiting to start up again.
normal means it hasn't been told to start running yet.
"

Here is the code given:

"
function core()
print("hola")
end

new_thread=coroutine.create(core)

print(coroutine.status(new_thread))

coroutine.resume(new_thread)

print(coroutine.status(new_thread))
"

And this is the result of the code:

"
suspended
hola
dead
"

Shouldn't the result code be:

normal
hola
dead? Since the created coroutine never used yield inside it.
Report Abuse
blobbyblob is not online. blobbyblob
Joined: 29 Oct 2008
Total Posts: 12165
21 Nov 2012 04:17 PM
I've never seen normal as a result. I think the suspended result is correct. I'll go check PiL.
Report Abuse
blobbyblob is not online. blobbyblob
Joined: 29 Oct 2008
Total Posts: 12165
21 Nov 2012 04:19 PM
Yeah, this is what Programming in Lua has to say.
"A coroutine can be in one of three different states: suspended, running, and dead. When we create a coroutine, it starts in the suspended state. That means that a coroutine does not run its body automatically when we create it."
Report Abuse
nrscsy is not online. nrscsy
Joined: 09 Nov 2012
Total Posts: 465
21 Nov 2012 04:20 PM
Then the normal status shouldn't be there. I got to admit it had me confused until I realized the code didn't match up with the result.
Report Abuse
blobbyblob is not online. blobbyblob
Joined: 29 Oct 2008
Total Posts: 12165
21 Nov 2012 04:23 PM
Meh, I got stripped of my wiki writer status. Probably because I haven't been on there in a year, hahaha.

Sorry, we'll have to wait for someone else to come along and make that change.
Report Abuse
nrscsy is not online. nrscsy
Joined: 09 Nov 2012
Total Posts: 465
21 Nov 2012 04:24 PM
Alright then. The most active writer I've seen is Arceus, so hopefully he will pass by soon.
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
21 Nov 2012 05:12 PM
I'll go ahead and change that then.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image