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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Why can't I iterate through objects?

Previous Thread :: Next Thread 
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
30 Sep 2015 12:42 PM
why!
Report Abuse
Poseidas is not online. Poseidas
Joined: 23 Nov 2008
Total Posts: 2659
30 Sep 2015 12:45 PM
Well... You can, you're probably just doing it wrong. However it is impossible to know without more information...
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
30 Sep 2015 12:46 PM
Because they're not tables.
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
30 Sep 2015 12:47 PM
i want to use ed da da for looop for ed da object but i cannt not en know no use it for da object!
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
30 Sep 2015 12:47 PM
But they act the same as tables!!
Report Abuse
Poseidas is not online. Poseidas
Joined: 23 Nov 2008
Total Posts: 2659
30 Sep 2015 12:48 PM
You are clearly not able to use this forum in an appropriate manner. Please go away.
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
30 Sep 2015 12:48 PM
shut up!
Report Abuse
morash is not online. morash
Joined: 22 May 2010
Total Posts: 5834
30 Sep 2015 12:49 PM
Userdata ~= table
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
30 Sep 2015 12:49 PM
Go back to OT.
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
30 Sep 2015 12:50 PM
"Go back to OT."

sthu I don't forum in OT
Report Abuse
Poseidas is not online. Poseidas
Joined: 23 Nov 2008
Total Posts: 2659
30 Sep 2015 12:50 PM
Chances are, you will get berated here for your ignorance. So I advise you to be the one to shut up.
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
30 Sep 2015 12:51 PM
"Userdata ~= table"

But objects store information in mock-tables, don't they? Is there a wiki thingy I can read about this?
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
30 Sep 2015 12:52 PM
"Chances are, you will get berated here for your ignorance. So I advise you to be the one to shut up."

i can script circles around you
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
30 Sep 2015 12:54 PM
Like, you access information in an object the same way as you do in tables.

I was thinking there was a metatable connected to each object type or something and they used the __index metamethod to control everything.
Report Abuse
Poseidas is not online. Poseidas
Joined: 23 Nov 2008
Total Posts: 2659
30 Sep 2015 12:54 PM
wow fun. Failtroll is fail. Bye.
Report Abuse
secret6timb1 is not online. secret6timb1
Joined: 11 Sep 2013
Total Posts: 1817
30 Sep 2015 12:54 PM
Use pairs or ipairs.

Like poseidas says, we need information.
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
30 Sep 2015 12:55 PM
You don't need more information, it's a very simple question.
Report Abuse
secret6timb1 is not online. secret6timb1
Joined: 11 Sep 2013
Total Posts: 1817
30 Sep 2015 12:55 PM
I think your attempting to be a troll now, nice try though.
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
30 Sep 2015 12:56 PM
In appearance, objects look the same as tables and you access their contents in the same way and all that so I was wondering what was restricting you from iterating through an object.
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
30 Sep 2015 12:58 PM
Like really, it's a simple question.
Report Abuse
Poseidas is not online. Poseidas
Joined: 23 Nov 2008
Total Posts: 2659
30 Sep 2015 01:00 PM
Do you mean the Userdata of objects? Like why can't you iterate through its properties and get a table of its Name, BrickColor, Position, etc.?
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
30 Sep 2015 01:00 PM
Yea exactly
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
30 Sep 2015 01:02 PM
Userdata doesn't work like that because of how they are represented on the C side. They don't actually 'hold' anything.
Report Abuse
progatician is not online. progatician
Joined: 30 Aug 2013
Total Posts: 8429
30 Sep 2015 01:05 PM
Is there a place I can go to get more info on this?
Report Abuse
Poseidas is not online. Poseidas
Joined: 23 Nov 2008
Total Posts: 2659
30 Sep 2015 01:05 PM
The same reason a NumberValue can act the same as an IntValue, but an IntValue can't act the same as a NumberValue.

They're two different things with two different behaviors. Just because there are similarities, and one seems like the other, it doesn't mean it's the exact same thing. That being said, you cannot loop through an object just because it holds values like a table does.

If you really really need to compile object information into tables, you can code a function to do so given the time and effort. However not everything is going to be made simple for you in the world of programming.
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