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: I Was Scripting And Found Beef

Previous Thread :: Next Thread 
VirgilStar1 is not online. VirgilStar1
Joined: 10 Mar 2013
Total Posts: 2737
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 is not online. 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
VirgilStar1 is not online. VirgilStar1
Joined: 10 Mar 2013
Total Posts: 2737
01 Mar 2015 07:19 PM
What is the output actually giving me? It changes every time I run it.

~Virgil~
Report Abuse
cntkillme is not online. 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
VirgilStar1 is not online. VirgilStar1
Joined: 10 Mar 2013
Total Posts: 2737
01 Mar 2015 07:29 PM
@cnt I don't understand.

~Virgil~
Report Abuse
mew903 is not online. 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
VirgilStar1 is not online. VirgilStar1
Joined: 10 Mar 2013
Total Posts: 2737
01 Mar 2015 07:46 PM
No, you explained it well. Thank you.

~Virgil~
Report Abuse
cpmoderator12345 is not online. cpmoderator12345
Joined: 26 Jan 2013
Total Posts: 15651
01 Mar 2015 07:57 PM
"13ABEEF0"
hexadecimal confirmed

3 days until my birthday
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