Results 1 to 7 of 7
Thread: While loop crashing?
- 10-18-2008, 10:09 PM #1
Member
- Join Date
- Oct 2008
- Posts
- 2
- Rep Power
- 0
While loop crashing?
I don't know if any of you has used RSPS's to code.
Well heres an example of the code that makes me crash:
if DELAY is bigger then 0,Java Code:while (X == 0) { if (DELAY > 0) { //Do this, blah blah X = 1; } }
Itll make a huge lag then by force makes the server crash.
Else if it isnt, itll work perfectly.
If anyone has experience in while loops, please help me! :D
Thanks,
KyleLast edited by ToplessGrunt; 10-18-2008 at 10:11 PM. Reason: Oops. ^_^
- 10-18-2008, 10:14 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
What is DELAY, are you using that value in a thread within the while loop?
- 10-18-2008, 11:44 PM #3
Take the blah blah out from inside of the if(DELAY >0) statement.//Do this, blah blah
...
f DELAY is bigger then 0,
Itll make a huge lag then by force makes the server crash.
- 10-20-2008, 12:07 AM #4
Member
- Join Date
- Oct 2008
- Posts
- 2
- Rep Power
- 0
But I want it to do it only if (DELAY > 0)
- 10-20-2008, 12:49 AM #5
What is DELAY?
- What is DELAY? A constant? A variable? An array?
- Where's the rest of the code?
- What does Blah, Blah do?
CJSLChris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- 10-20-2008, 04:12 AM #6
There is a contraction here.if DELAY is bigger then 0,
Itll make a huge lag then by force makes the server crash.
Else if it isnt, itll work perfectly.
What is the "it"? Your sample code shows:I want it to do it only if (DELAY > 0)
//Do this, blah blah
Can you explain?
- 10-20-2008, 11:07 AM #7
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Seems no sign of explanation here. Lots of confusions here with this.
Similar Threads
-
For Loop
By kian_hong2000 in forum New To JavaReplies: 1Last Post: 08-07-2008, 02:01 PM -
IE crashing on windows 2003 64 bit OS while loading applet java 6
By DevzAbhi in forum Advanced JavaReplies: 0Last Post: 07-29-2008, 01:19 PM -
How to use While loop
By Java Tip in forum java.langReplies: 0Last Post: 04-17-2008, 07:44 PM -
do...while loop
By eva in forum New To JavaReplies: 16Last Post: 01-31-2008, 06:44 AM -
while loop
By michcio in forum New To JavaReplies: 5Last Post: 01-27-2008, 12:56 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks