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: Scripting Challenge

Previous Thread :: Next Thread 
oxcool1 is not online. oxcool1
Joined: 05 Nov 2009
Total Posts: 15444
27 Jan 2012 10:43 PM
[ Content Deleted ]
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
27 Jan 2012 10:44 PM
dang, I never understood newproxy() >:/
Report Abuse
FreeGamesROBLOX is not online. FreeGamesROBLOX
Joined: 15 Jun 2011
Total Posts: 6622
27 Jan 2012 10:45 PM
"dang, I never understood newproxy() >:/"
New
Proxy...
How do you NOT understand that...?
Report Abuse
FreeGamesROBLOX is not online. FreeGamesROBLOX
Joined: 15 Jun 2011
Total Posts: 6622
27 Jan 2012 10:46 PM
It's like not understanding Instance.new()
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
27 Jan 2012 10:48 PM
@FreeGamesROBLOX Complete this challenge then

[=|I rate myself 6/10 in RBLX.Lua|=]
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
27 Jan 2012 10:49 PM
@free, not really because it's used with tables and metatables. Instance.new() is used 98% more times in scripts than with newproxy(). I never bothered learning because wiki didn't explain it that well and what it could be used for...
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
27 Jan 2012 10:52 PM
@free, dont try to insult my knowledge, I really only learn from wiki because it's reliable (95% of the time) and anything that isn't understandable to me with the way that they've explained it I just ignore. this is all it gives me about newproxy:

newproxy (boolean or proxy)Undocumented feature of Lua.

Arguments: boolean - returned proxy has metatable or userdata - different proxy created with newproxy

Creates a blank userdata with an empty metatable, or with the metatable of another proxy.

Example
local a = newproxy(true)
local mt = getmetatable(a)
print( mt ~= nil ) --> true

local b = newproxy(a)
print( mt == getmetatable(b) ) --> true

local c = newproxy(false)
print( getmetatable(c) ~= nil ) --> false

print( a.Name ) --> attempt to index local 'a' (a userdata value)
mt.__index = {Name="Proxy"}
print( a.Name ) --> Proxy
print( b.Name ) --> Proxy
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
27 Jan 2012 10:55 PM
I would try and solve this but, I do not understand the challenge. Plus my downfall is that I cannot piece all that I know together. I cannot figure stuff out, I just can learn it.

[=|I rate myself 6/10 in RBLX.Lua|=]
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
27 Jan 2012 11:03 PM
Going out on a limb...

    t = {}
    t[newproxy(true)] = true
     
    for i,v in pairs(t) do
    i = nil
    print(i)
    end

[=|I rate myself 6/10 in RBLX.Lua|=]
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
27 Jan 2012 11:04 PM
Never mind, used a loop haha. Did not read or loops.

[=|I rate myself 6/10 in RBLX.Lua|=]
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
27 Jan 2012 11:04 PM
@ox, can you show me the answer except with loops? so I can get a feel of how it could be done?
Report Abuse
oxcool1 is not online. oxcool1
Joined: 05 Nov 2009
Total Posts: 15444
27 Jan 2012 11:16 PM
[ Content Deleted ]
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
27 Jan 2012 11:18 PM
Free seems to be a..

'I have no idea what the answer to this is so I'll try and look smart and insult someone else' type of guy.

Eh, what do I know? No idea how newproxy functions.
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
27 Jan 2012 11:46 PM
Any hints?

[=|I rate myself 6/10 in RBLX.Lua|=]
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
27 Jan 2012 11:50 PM
I cannot get it, so here is my last attempt. I got rid of everything haha.

t = {}

t[newproxy(true)] = true

t = nil

[=|I rate myself 6/10 in RBLX.Lua|=]
Report Abuse
oxcool1 is not online. oxcool1
Joined: 05 Nov 2009
Total Posts: 15444
27 Jan 2012 11:54 PM
[ Content Deleted ]
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
27 Jan 2012 11:55 PM
I know, I got fed up with it. I know that the index is the userdata, so I need to figure out how to index it according to the current userdata hex.

[=|I rate myself 6/10 in RBLX.Lua|=]
Report Abuse
Legend26 is not online. Legend26
Joined: 08 Sep 2008
Total Posts: 10586
28 Jan 2012 12:10 AM
setmetatable(t,{__mode="k"})
collectgarbage()

In theory, since there is no other reference to the proxy, it would be garbage collected and removed.
Report Abuse
TheNewScripter is not online. TheNewScripter
Joined: 02 Mar 2010
Total Posts: 2432
28 Jan 2012 12:11 AM
Come on ox, hint. :D

▌†ПŠ▐
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
28 Jan 2012 12:12 AM
@TNS Cannot figure it out either?

[=|I rate myself 6/10 in RBLX.Lua|=]
Report Abuse
TheNewScripter is not online. TheNewScripter
Joined: 02 Mar 2010
Total Posts: 2432
28 Jan 2012 12:18 AM
No I asked for a hint because I knew the answer to it.
[/sarcasm]

:P

▌†ηϨ▐
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
28 Jan 2012 12:21 AM
:P

I know now that the table is empty even after it is set.

That might be helpful.

[=|I rate myself 6/10 in RBLX.Lua|=]
Report Abuse
Legend26 is not online. Legend26
Joined: 08 Sep 2008
Total Posts: 10586
28 Jan 2012 12:21 AM
*Everyone ignored my (most probably) correct answer*

You guys are weird.
Report Abuse
TheNewScripter is not online. TheNewScripter
Joined: 02 Mar 2010
Total Posts: 2432
28 Jan 2012 12:23 AM
@Legend
ox never said that was the correct way, therefore everyone ignores it. Until ox acknowledges your post, I shall ignore it.

@Rider
Only the best can solve ox's challenges... :o

▌†ηϨ▐
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
28 Jan 2012 12:23 AM
I did not ignore it, I tested it. It said could not something collect.

[=|I rate myself 6/10 in RBLX.Lua|=]
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