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 » Scripting Helpers
Home Search
 

Re: mod?

Previous Thread :: Next Thread 
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
05 Aug 2012 07:06 PM
What does mod mean? I saw a script in a model rotation, and I addapted it to search for tables, but I'm getting a weird output :/
Can anyone help?



GetEverything = (function(Table)
local parts ={}
local TableTable = {}
local Table = Table
local function scan(Table)
for _,item in pairs(Table) do
if item.IsA ~= nil then
if (item:IsA("BasePart")) then
table.insert(parts,item)
end
else
if type(item) == "table" then
table.insert(TableTable, item)
end
end
scan(item)
end
end
scan(mod)
TableTable = TableTable--TheTable
parts = parts--Theparts
end);
GetEverything(game.Lighting:GetChildren())


Output:


table: 0x20a46620
20:00:44.056 -
GetEverything = (function(Table)
print(Table) local parts:6: attempt to get length of local 'Table' (a nil value)
20:00:44.057 - Script "
GetEverything = (function(Table)
print(Table) local parts", Line 6 - global scan
20:00:44.058 - Script "
GetEverything = (function(Table)
print(Table) local parts", Line 19 - global GetEverything
20:00:44.058 - Script "
GetEverything = (function(Table)
print(Table) local parts", Line 23
20:00:44.059 - stack end

So it thinks that Table == nil, but it's not...
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
05 Aug 2012 07:08 PM
"Mod" is whatever you define, however in this script, it's not defined.
Report Abuse
josh50000 is not online. josh50000
Joined: 29 Nov 2009
Total Posts: 697
05 Aug 2012 07:10 PM
u havent set mod to anything
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
05 Aug 2012 07:12 PM
Uhg, how to prevent stack overflow again?
Report Abuse
josh50000 is not online. josh50000
Joined: 29 Nov 2009
Total Posts: 697
05 Aug 2012 07:14 PM
use wait() i think
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
05 Aug 2012 07:18 PM
Stack overflow happens when a function calls itself too many times. I tried wait(), but it doesn't work :/
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
05 Aug 2012 07:32 PM
Help
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
06 Aug 2012 08:04 PM
merp
Report Abuse
pwnedu46 is not online. pwnedu46
Joined: 23 May 2009
Total Posts: 7534
06 Aug 2012 09:20 PM
You're getting a stack overflow because you're making too many recursive calls.

try changing scan(item)
to
return scan(item)
Report Abuse
TheEpicSamuri is not online. TheEpicSamuri
Joined: 04 Dec 2011
Total Posts: 1343
06 Aug 2012 09:35 PM
I have a modded world at war game if that what you mean.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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