|
| 01 Mar 2015 07:16 PM |
I was goofing around with :GetPlayer() and when I ran this script :
x = game.Players:GetPlayers("Player1") print(x)
Output : table: 13ABEEF0
~Virgil~ |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 Mar 2015 07:16 PM |
The argument is ignored, so that's really the same thing as game.Players:GetPlayers() really.
And what about it? |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 07:19 PM |
What is the output actually giving me? It changes every time I run it.
~Virgil~ |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 Mar 2015 07:24 PM |
| Well by default, when you tostring a table or userdata, it gives you the location in memory. And print tostring's all of its arguments so yeah |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 07:29 PM |
@cnt I don't understand.
~Virgil~ |
|
|
| Report Abuse |
|
|
mew903
|
  |
| Joined: 03 Aug 2008 |
| Total Posts: 22071 |
|
|
| 01 Mar 2015 07:44 PM |
game.Players::GetPlayers returns a table of all of the players in the game. There are no arguments to it. You might have meant
game.Players:GetPlayers()["Player1"]
But that wouldn't work either, Q_Q.
Onto the BEEF:
When a table is created, it's assigned a spot in the client/server's memory.
i.e. Say GetPlayers makes a table like so:
myTable = { player1, ... };
the server/client reads this as something along the lines of
SET 0x0BEEF, { player1, ... }
and when you call tostring on myTable, it'll return it's address in the memory (the print function calls tostring on anything called with it)
print(myTable) --> table: 0x0BEEF
I'm trying to make this as easy as possible to understand. Any questions feel free to ask |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 07:46 PM |
No, you explained it well. Thank you.
~Virgil~ |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 07:57 PM |
"13ABEEF0" hexadecimal confirmed
3 days until my birthday |
|
|
| Report Abuse |
|
|