|
| 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 |
|
|
| |
|
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 |
|
|
|
| 23 Apr 2015 06:03 PM |
| I've tried both of those. Literally too. It prints nothing though. |
|
|
| Report Abuse |
|
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 23 Apr 2015 06:05 PM |
| That means the table isn't empty. |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Apr 2015 07:37 PM |
| These are where metatables and the __index function comes in handy... |
|
|
| Report Abuse |
|
|