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 » Scripters
Home Search
 

Re: Yeilding in Metatables

Previous Thread :: Next Thread 
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
04 Oct 2012 06:24 PM
18:23:23 - attempt to yield across metamethod/C-call boundary
18:23:23 - Script "Workspace.QuentyAdminSystems", Line 134 - upvalue WaitForChild
18:23:23 - Script "Workspace.QuentyAdminSystems", Line 207
18:23:23 - Script "Workspace.QuentyAdminSystems", Line 216
18:23:23 - stack end
18:23:23 - cannot resume non-suspended coroutine
18:23:23 - Script "Workspace.QuentyAdminSystems", Line 134 - upvalue WaitForChild
18:23:23 - Script "Workspace.QuentyAdminSystems", Line 207
18:23:23 - Script "Workspace.QuentyAdminSystems", Line 216
18:23:23 - stack end

Apparently you can't... Right?
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
04 Oct 2012 06:29 PM
metamethods*
Report Abuse
belial52 is not online. belial52
Joined: 10 Oct 2009
Total Posts: 8074
04 Oct 2012 06:39 PM
That there means you were trying to yield in a pcall or xpcall and not in a ypcall.
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
04 Oct 2012 06:56 PM
@belial

"metamethod/C-call"

...
. . .
. . . . . .
. . . . . . . . . .
Report Abuse
Garnished is not online. Garnished
Joined: 09 Apr 2012
Total Posts: 12695
04 Oct 2012 07:42 PM
This is not metatables.
*facepalmr*
Report Abuse
belial52 is not online. belial52
Joined: 10 Oct 2009
Total Posts: 8074
04 Oct 2012 09:18 PM
@Popin, That is the error that is thrown out when you use a wait() in a pcall or xpcall, the only reason I know that is I got it a lot when I was attemptinig to use xpcall for my SB.
Report Abuse
stravant is not online. stravant
Forum Moderator
Joined: 22 Oct 2007
Total Posts: 2893
05 Oct 2012 01:00 AM
Nope.

It works in Lua 5.2 but there's no way to do it in Roblox with 5.1. That's why there's no yielding properties.

Otherwise I would have made more awesome hacks like:

WaitFor(game.Workspace).Part1.BrickColor = "Red"
Report Abuse
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
05 Oct 2012 01:01 AM
^ That's what I tried to do....

Ah... oh well. It's only a few more seconds of typing...
Report Abuse
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
05 Oct 2012 01:21 AM
And BTW, I wasn't yielding in a pcall, although, now I kind of know how pcall works (Or at least a small hint) (Yay ignorance!).

My code was something like:

setmetatable(Resources, {__index = function(Table, Index)
return WaitForChild(System.Resources, Index).Value
end})

System.Version = Resources.Version

Report Abuse
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
05 Oct 2012 02:30 AM
*More facepalm because I misspelled Yielding*
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
05 Oct 2012 11:22 AM
>It works in Lua 5.2 but there's no way to do it in Roblox with 5.1. That's why there's no yielding properties.

Why can't we have Lua 5.2 or maybe an option of 5.1 or 5.2 with script objects???

Hardly anything was changed in 5.2.

All I can really think of that might break some games is getfenv, but you know....ROBLOX breaks games all the time and for crappy reasons. At least break the games while improving others.

Oh, and LuaJIT.

If we had LuaJIT AND 5.2...
Report Abuse
belial52 is not online. belial52
Joined: 10 Oct 2009
Total Posts: 8074
05 Oct 2012 04:36 PM
@Quenty, Pcalls go C-side when you use them, that's why you can't yield them unless you use ypcall.
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
05 Oct 2012 05:02 PM
@Belial52

You must not understand the fact that it isn't solely for any protective call function. Everyone who tried to tell you otherwise knows what you just said, but it isn't the only method of invoking the metamethod boundary error. Yielding isn't restricted to pcall, obviouslly.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
05 Oct 2012 05:12 PM
"Hardly anything was changed in 5.2."

What? Have you even looked at the change log? You're kidding, right?

"All I can really think of that might break some games is getfenv, but you know....ROBLOX breaks games all the time and for crappy reasons. At least break the games while improving others."

Do you really think they're that stupid? Why would they break all games that use getfenv or setfenv when they can just keep them while still adding _ENV?

Even if there was no way to not break games, they'd give us a new script object instead of replacing the old one.
Report Abuse
Quenty is not online. Quenty
Joined: 03 Sep 2009
Total Posts: 9316
05 Oct 2012 05:29 PM
Yeah, a new script object would be nice. Or (BETTER YET!) a property of a script!

And preferably it would be much more syntax specific...
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
05 Oct 2012 05:42 PM
I'd imagine that the reason they don't update is probably because of all the modifications they've made to the source of the Lua VM to get it to work properly(most of the time) with their engine.
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
06 Oct 2012 02:03 AM
Last time I checked hardly anything had changed.

Just a new type of table, the enviroment changes and something else which I forgot
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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