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: Stack Overflow?

Previous Thread :: Next Thread 
ThrownException is not online. ThrownException
Joined: 17 Apr 2009
Total Posts: 1945
01 Aug 2015 07:25 PM
For some reason this code returns a stack overflow:

unwrap = function(...)
local r = {};
for k,v in next,{...} do
table.insert(r, pcall(function() if not rawget(v, "_Real") then error() end end) and v._Real or v)
end
return unpack(r);
end

Does anyone know why?
Report Abuse
CrescentJade is not online. CrescentJade
Joined: 07 Jul 2010
Total Posts: 5494
01 Aug 2015 07:29 PM
Dont you lock your metatable when you wrap userdatas? Meh. Anyway

WTF is this

table.insert(r, pcall(function() if not rawget(v, "_Real") then error() end end) and v._Real or v)

wut ru doing.

how r u wrapping this.
Report Abuse
ThrownException is not online. ThrownException
Joined: 17 Apr 2009
Total Posts: 1945
01 Aug 2015 07:30 PM
I would need to pm you the code, I am not comfortable saying it on here.

One second.
Report Abuse
ThrownException is not online. ThrownException
Joined: 17 Apr 2009
Total Posts: 1945
01 Aug 2015 07:45 PM
Bump
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Aug 2015 07:57 PM
'return unpack(r);'
Hmm, I wonder why...
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
01 Aug 2015 07:58 PM
You probably want to add 'if #r > 0 then'
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