|
| 27 Jun 2013 01:14 PM |
function findPlayer(arg) local goodplayers = {} players = game.Players:getPlayers() for i = 1, #players do if players[i].TeamColor ~= arg then table.insert(goodplayers,players[i]) end return goodplayers end
Would this work if table = findPlayer(BrickColor.new(69)? |
|
|
| Report Abuse |
|
|
|
| 27 Jun 2013 01:18 PM |
Open View>Output to see bugs
table = findPlayer(BrickColor.new(69)) -- this was missing a bracket, and may have returned an error. print(table) -- to prove or disprove your theory. |
|
|
| Report Abuse |
|
|
|
| 27 Jun 2013 01:27 PM |
| Thanks, the only problem is that this is just a segment of something which hasn't been coded yet, so I'm not able to replicate parameters ect. |
|
|
| Report Abuse |
|
|
|
| 27 Jun 2013 01:28 PM |
The main thing is that you can return a table. Is it possible? |
|
|
| Report Abuse |
|
|
RoAnt
|
  |
| Joined: 14 Jul 2008 |
| Total Posts: 16794 |
|
|
| 27 Jun 2013 01:34 PM |
Yes, table can be return but it will return as a... hexadecimal? I forgot but it would look like this:
table: 0x9d9bb0
I tested this:
function tab() loltable = {"lol"} return loltable end
print(tab()) |
|
|
| Report Abuse |
|
|
|
| 27 Jun 2013 01:40 PM |
| I don't think you can print tables. Let me try printing the contents of it. |
|
|
| Report Abuse |
|
|
|
| 27 Jun 2013 01:41 PM |
I tested this:
function tab() loltable = {"lol"} return loltable end
print(table.concat(tab()))
and it seems to work. Thanks for the support guys. |
|
|
| Report Abuse |
|
|