BeeHay Posted April 24, 2013 Share Posted April 24, 2013 Hello again! Just a few quick questions about some things I am unsure of... Am I using the try correctly? Can I have a waitfor() after a try? private timey = systime() + 120while(1) try waitfor(SysTime() > timey, 10) //do stuff here Delay(1) timey = SysTime() + 120 Delay(1) catch() endcatch()endwhile[/CODE]Also, can I do "OR" in a wait for?[CODE]while(1) waitfor((var < private.var) || (var2 < private.var2)) //do stuffendwhile[/CODE]Any advice would be great! Link to comment Share on other sites More sharing options...
AzeoTech Posted April 24, 2013 Share Posted April 24, 2013 The try is correct, though your indentation needs work (might just be the post). I also typically put ? strLastError at a minimum in my catch blocks so I can at least see the error in the command/alert window. Yes, you can do OR in waitfor(). Waitfor takes an expression, so you can do any math that results in a number. BTW in your second code, you forgot the interval for waitfor(). Link to comment Share on other sites More sharing options...
BeeHay Posted April 24, 2013 Author Share Posted April 24, 2013 Thanks for the quick reply! Yes, the forums "code" window wont let me tab to correct my indentation! Ah yes, I forgot the interval in the last one.... Appreciate it! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.