| |
|
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
|
  |
| Joined: 22 May 2010 |
| Total Posts: 5834 |
|
|
| 30 Sep 2015 12:46 PM |
| Because they're not tables. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 30 Sep 2015 12:47 PM |
| But they act the same as tables!! |
|
|
| Report Abuse |
|
|
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 |
|
|
| |
|
morash
|
  |
| Joined: 22 May 2010 |
| Total Posts: 5834 |
|
| |
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
|
| 30 Sep 2015 12:50 PM |
"Go back to OT."
sthu I don't forum in OT |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 23 Nov 2008 |
| Total Posts: 2659 |
|
|
| 30 Sep 2015 12:54 PM |
| wow fun. Failtroll is fail. Bye. |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2015 12:54 PM |
Use pairs or ipairs.
Like poseidas says, we need information. |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2015 12:55 PM |
| You don't need more information, it's a very simple question. |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2015 12:55 PM |
| I think your attempting to be a troll now, nice try though. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 30 Sep 2015 12:58 PM |
| Like really, it's a simple question. |
|
|
| Report Abuse |
|
|
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 |
|
|
| |
|
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 |
|
|
|
| 30 Sep 2015 01:05 PM |
| Is there a place I can go to get more info on this? |
|
|
| Report Abuse |
|
|
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 |
|
|