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: Anything wrong with this?

Previous Thread :: Next Thread 
Stxdio is not online. 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
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
01 Mar 2015 11:16 AM
no
Report Abuse
extremeninjamaster is not online. extremeninjamaster
Joined: 25 Feb 2012
Total Posts: 2570
01 Mar 2015 11:19 AM
I dunno try it out
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
01 Mar 2015 11:21 AM
deadzoneSpawns[#deadzoneSpawns+1] = child.CFrame.p;

y u no table.insert()
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
01 Mar 2015 11:23 AM
'y u no table.insert()'

It's slower.
Report Abuse
digpoe is not online. 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
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
01 Mar 2015 11:25 AM
I'm pretty sure table.insert's code is

table[#table+1] = item
Report Abuse
digpoe is not online. 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
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
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
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