nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 22 Dec 2012 12:41 PM |
we all hate it when a while loop without a delay crashes our games (... possibly discarding all your work...)
why. can't. there. be. a. solution? whether it be force stopping the code or w/e.
that's all I have to say. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
| |
|
xSIXx
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 9202 |
|
|
| 22 Dec 2012 12:48 PM |
get used to the habit of
while wait(1) do
to start while loops and you will never make that mistake again. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
| |
|
|
| 22 Dec 2012 12:53 PM |
*reasons
I just use while wait() do... |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
| |
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 22 Dec 2012 01:11 PM |
| Well saving your place all the time helps allot. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 22 Dec 2012 01:14 PM |
| that's the largest pain in the badass (because we're allowed to say that) ever. |
|
|
| Report Abuse |
|
|
129K
|
  |
| Joined: 23 Aug 2011 |
| Total Posts: 19010 |
|
| |
|
| |
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 22 Dec 2012 01:16 PM |
| Mmm dunno, I don't remember any incidents for meh with it... I'm not even doing anything like while wait() do, just regular while bool do |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2012 01:20 PM |
| I used to do it all the time and it really angered me, but then I learnt after getting a really unstable computer that saving the place to the HDD after every change was a really good idea. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 22 Dec 2012 01:21 PM |
"Ctrl + S done :D"
there's more than that. then there's the fact that you're creating a new file that you're probably never going to open again. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 22 Dec 2012 01:21 PM |
| and I don't think I can keep up with constantly saving. I'd forget in the middle of troubleshooting or something. |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 22 Dec 2012 01:22 PM |
| Ehh.... I do open files, but back when I was building on roblox, I could never finish anything til end. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2012 01:25 PM |
I have a storing system for Roblox on my computer. I have a folder full of models, places, SB scripts, studio scripts and some other stuff. Then I have a folder inside my places folder for obsolete projects.
It works quite nicely. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 22 Dec 2012 01:26 PM |
| Is that really the job of the user? to constantly save in case of an unexpected crash? |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 22 Dec 2012 01:27 PM |
| Yes, if you don't like random loops crashing your place. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2012 01:29 PM |
| It's a good habit to get used to. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 22 Dec 2012 01:30 PM |
| but the thing is: random loops SHOULD NOT crash my place. |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 22 Dec 2012 01:35 PM |
| But then why do you make them random? TAKE CONTROL OVER EET! |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 22 Dec 2012 01:41 PM |
but they're not always random :(.
For instance, I'll tell you why this occurs 90% of the time.
So, i'm starting my loop:
while true do wait() end
then, I make an edit:
while true do if blah then wait() end end
little do I know, the wait is within the if scope, so I test.
CRASH. |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 22 Dec 2012 01:43 PM |
| I dunnoo... Always when I press X key for script editor, I automatically click on save button thingy(not even using Ctrl+S). |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 22 Dec 2012 01:52 PM |
| lrn2game:SaveToRoblox()w/plugins |
|
|
| Report Abuse |
|
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 22 Dec 2012 03:28 PM |
I think that it's a sign that you should be more careful thinking about the conditions on your loops. I haven't had a loop hang in more than a year now, I think you're just being careless.
As for why it's not possible to "stop when it's stuck in a hang": You effectively need to solve the halting problem in order to fix it. That is, you need to be able to determine whether a piece of code will stop ("halt") or not without actually running it. And that's provably impossible. Without being able to determine that it's impossible for Roblox to know whether your code is actually hanging or whether you're just running a long process which takes a long time to finish computing something.
What can be done to fix it: Run an extra thread to handle the UI processing in addition to the actual game engine thread. That way you'd still be able to tell the game to "stop" when you know that it's hung. This is probably still hard given the architecture of the Roblox application, or they would have done it already.
|
|
|
| Report Abuse |
|
|