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: Pressed Play while there was an Infinite Loop. Escaping?

Previous Thread :: Next Thread 
Craftero is not online. Craftero
Joined: 24 Jun 2011
Total Posts: 1451
12 Feb 2016 12:01 PM
I pressed Play before realising I had created an infinite loop in my code.
Now Studio is trying to Play, and failing by the looks of it (who would have guessed!).

Is there any way to escape this procedure and return to standard Studio mode?
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
12 Feb 2016 12:01 PM
Restart studio and add a wait into your loop.
Report Abuse
Craftero is not online. Craftero
Joined: 24 Jun 2011
Total Posts: 1451
12 Feb 2016 12:03 PM
If I simply restart, I could lose all my progress up until now.

Perhaps there isn't a shortcut for this at all?
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
12 Feb 2016 12:41 PM
by not putting in infinite loops
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
12 Feb 2016 12:42 PM
Usually during a crash studio will auto save. Just make sure the place is saved then end studio
Report Abuse
Bernkastel2727 is not online. Bernkastel2727
Joined: 23 Sep 2012
Total Posts: 2612
12 Feb 2016 12:45 PM
Use while wait() do instead of while true do, also if you open up the Studio engine, they have a autosave function and it will detect your lost progress
Report Abuse
Craftero is not online. Craftero
Joined: 24 Jun 2011
Total Posts: 1451
12 Feb 2016 12:52 PM
Thanks everyone.

I was really just looking for a way to escape the Play Test procedure itself, but it seems there is no such method of doing so.

Of course, I didn't include the infinite loop on purpose - I just forgot to add a wait() - but most of you probably knew that.

Thanks for the advise anyway.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
12 Feb 2016 12:57 PM
Why does the window stop responding? Why doesn't it reserve some resources to keep the window running?


Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
12 Feb 2016 01:13 PM
To my knowledge the client (and by extension studio) is single threaded. So once the low level language that runs the client goes into the infinite loop, it cannot do anything else (No physics updates, no rendering, etc).

This allows you do do fun things like control the client frame rate (i.e. lag scripts).



local desiredFPS = 8

local waitTime = 1/desiredFPS
local tock = tick()
game:GetService("RunService").RenderStepped:connect(function()
repeat until tick() >= tock+waitTime
tock = tick()
end)
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
12 Feb 2016 01:23 PM
Interesting. Good to know. 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