|
| 19 Jun 2014 10:15 PM |
| I'm adding a large amount of values to a table inside of a local script through a tool, will this lag my game if there are too many values inside the table? |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 10:24 PM |
Say, how much tables? You can count it using print(#MyTable) |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 10:25 PM |
| You should try it yourself instead of asking us. Who knows, maybe you'll learn something. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 10:32 PM |
| "Scripting helpers". i guess it really is for people who need help. |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Jun 2014 10:34 PM |
| I'm helping you become more independent so you can learn something on your own and not have to rely on others to confirm it. You're welcome. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 10:35 PM |
| Depends on what you do with the table, and what a "large number" is. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 10:35 PM |
| scripting wise please, and dhat it's the same number everytime. I guess it's not really adding that many values. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 10:36 PM |
| Ninja specify how big the table is using the feature I gave you in output. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 10:37 PM |
Oh unknown. This is in relation to your raycast scripting thing you sent me that ignores hats and tools. Sadly, it only works for your player not other players. Maybe it's a local problem?
And I kinda rewrote the script.
for i, v in ipairs(game.Players:GetPlayers()) do if v == Player then print(v) for i2, v2 in ipairs(v.Character:GetChildren()) do if v2:IsA'Tool' or v2:IsA'Hat' then table.insert(ignore, v2) print(#ignore) end end end end
|
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 10:37 PM |
| Dhat, you can use that too. That's the table script. |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Jun 2014 10:38 PM |
Oh:
if v ~= player then
Right.
Anyway, that's not a very large number. You could increase the efficiency by storing the table permanently, then updating it when something changes, but it probably wont be too bad. |
|
|
| Report Abuse |
|
|
|
| 19 Jun 2014 10:41 PM |
| Oh lol. I changed v == Player on purpose, let's change it back to see if it works. |
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Jun 2014 10:50 PM |
| thanks man, works. i get what you mean by v ~= Player now |
|
|
| Report Abuse |
|
|
| |
|