Stxdio
|
  |
| Joined: 12 Aug 2012 |
| Total Posts: 1608 |
|
|
| 01 Mar 2015 11:15 AM |
local bans = {};
local solo = false;
local safezoneSpawns = {}; local deadzoneSpawns = {}; local admins = {"Stxdio"};
local globalPages = 15;
for index, child in pairs(workspace.targetFilter.ignore.safezoneSpawns:getChildren()) do if child:isA("BasePart") then safezoneSpawns[#safezoneSpawns+1] = child.CFrame.p+Vector3.new(0, 5.5, 0); end end
for index, child in pairs(workspace.targetFilter.ignore.deadzoneSpawns:getChildren()) do if child:isA("BasePart") then deadzoneSpawns[#deadzoneSpawns+1] = child.CFrame.p; child:Destroy(); end end |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 01 Mar 2015 11:21 AM |
deadzoneSpawns[#deadzoneSpawns+1] = child.CFrame.p;
y u no table.insert() |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 11:23 AM |
'y u no table.insert()'
It's slower. |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 01 Mar 2015 11:24 AM |
| plus I'm pretty sure table.insert() has issues on sparse arrays |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 11:25 AM |
I'm pretty sure table.insert's code is
table[#table+1] = item |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 01 Mar 2015 11:27 AM |
no it's not:
static int tinsert (lua_State *L) { int e = aux_getn(L, 1) + 1; /* first empty element */ int pos; /* where to insert new element */ switch (lua_gettop(L)) { case 2: { /* called with only 2 arguments */ pos = e; /* insert new element at the end */ break; } case 3: { int i; pos = luaL_checkint(L, 2); /* 2nd argument is the position */ if (pos > e) e = pos; /* `grow' array if necessary */ for (i = e; i > pos; i--) { /* move up elements */ lua_rawgeti(L, 1, i-1); lua_rawseti(L, 1, i); /* t[i] = t[i-1] */ } break; } default: { return luaL_error(L, "wrong number of arguments to " LUA_QL("insert")); } } luaL_setn(L, 1, e); /* new size */ lua_rawseti(L, 1, pos); /* t[pos] = v */ return 0; } |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 11:27 AM |
table.insert doesn't even have any code. And it's a function call And an index.
It _IS_ slower. You can test these things. |
|
|
| Report Abuse |
|
|