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: Tables

Previous Thread :: Next Thread 
BloodLitch101 is not online. BloodLitch101
Joined: 13 Jul 2011
Total Posts: 941
23 Apr 2015 05:57 PM
Whenever a player leaves, it makes the table nil. Apparently tables can't print if their is nothing in it? I'm not really good with tables.

if #table == nil then
print("Empty table.")
end
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
23 Apr 2015 05:59 PM
#table == 0
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
23 Apr 2015 06:01 PM
'if #table == nil then
print("Empty table.")
end'

if #table == 0 then

--

because it will always return a number value.
Report Abuse
BloodLitch101 is not online. BloodLitch101
Joined: 13 Jul 2011
Total Posts: 941
23 Apr 2015 06:03 PM
I've tried both of those. Literally too. It prints nothing though.
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
23 Apr 2015 06:05 PM
That means the table isn't empty.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
23 Apr 2015 07:13 PM
print(type(table))
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
23 Apr 2015 07:37 PM
These are where metatables and the __index function comes in handy...
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