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
 

Would studio crash if I did this?

Previous Thread :: Next Thread 
helicopter35 is not online. helicopter35
Joined: 25 Oct 2010
Total Posts: 1225
27 Mar 2015 08:34 PM
Say make a huge number in a for loop, would studio basically crash?

for a = 1,_ --insert large number here
print(a)
end

If it doesn't crash, it would just print everything but I don't see how it could go so fast if it's a large number.
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
27 Mar 2015 08:35 PM
stack overflow it wouldn't run once because 1 is > -99e99
Report Abuse
helicopter35 is not online. helicopter35
Joined: 25 Oct 2010
Total Posts: 1225
27 Mar 2015 08:35 PM
Whoops, forgot 'do'

for a = 1,_ do --insert large number in blank
print(a)
end
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
27 Mar 2015 08:36 PM
It depends on how large of a number it is.
Report Abuse
helicopter35 is not online. helicopter35
Joined: 25 Oct 2010
Total Posts: 1225
27 Mar 2015 08:39 PM
See, I tested it in Codepad. I see it has a limit, as it ended with 'timeout'

http://codepad.org/c48CrW0E
Report Abuse
helicopter35 is not online. helicopter35
Joined: 25 Oct 2010
Total Posts: 1225
27 Mar 2015 08:41 PM
But I'm not sure if it works the same with rbx.lua in studio. Would it? Would the output display "timeout" or something related to that?
Report Abuse
TheScripterGeek is not online. TheScripterGeek
Joined: 02 Sep 2012
Total Posts: 1192
27 Mar 2015 08:52 PM
you need a wait() because you cant value's that fast and then get the value from the variable, because its changing so fast... xD
Report Abuse
LegitimatlyMe is not online. LegitimatlyMe
Joined: 30 Oct 2013
Total Posts: 1108
27 Mar 2015 09:07 PM
A timeout happens if you don't yield for 30 or more seconds.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
27 Mar 2015 09:11 PM
025 you have no idea what stack overflows are apparently.

And if it's big enough it might eventually finish (depending on how big it is, ofc.) but if you have to use such a huge number, consider yielding a bit.
Report Abuse
LucasLua is not online. LucasLua
Joined: 18 Jun 2008
Total Posts: 7386
27 Mar 2015 09:14 PM
It would freeze Roblox Studio due to the print line, but if you were to say only add one number up like a counter then it shouldn't crash no matter the size (unless you use math.huge, which is the Lua representation of infinite). The print function is actually very resource intensive compared to simple operations like addition.
Report Abuse
LucasLua is not online. LucasLua
Joined: 18 Jun 2008
Total Posts: 7386
27 Mar 2015 09:15 PM
I'm mistaken, Roblox Studio will still freeze if you make the number super large, such as over 10 digits. lol
Report Abuse
helicopter35 is not online. helicopter35
Joined: 25 Oct 2010
Total Posts: 1225
27 Mar 2015 10:10 PM
Alright, got it. Just wanted to clear it up, thanks.
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