![]() |
|
Problem With If Statement - Printable Version +- Comfort Automation/ Security System Forums (https://www.comfortforums.com) +-- Forum: Support (https://www.comfortforums.com/forum-2.html) +--- Forum: Problems & Troubleshooting (https://www.comfortforums.com/forum-36.html) +---- Forum: Responses and Actions (https://www.comfortforums.com/forum-74.html) +---- Thread: Problem With If Statement (/thread-1820.html) |
- Podro - 04-16-2010 I am trying to simulate responding to a perimeter alarm by turning on lights in a sequence. I am having problems getting the reponse to work. Everything works fine until I add the third \'Do\' command line, it even works if I remove the \'After 7 Seconds Using Perimeter03\' from that line of code. If NightTime <> 0 Then If AlarmState <> Idle Then Do 1stLandingOn After 3 Seconds Using Perimeter01 Do HallLightOn After 5 Seconds Using Perimeter02 Do KitchenSpotOn After 7 Seconds Using Perimeter03 End If End If I have moved the \'Do\' lines around and each work in combinations of two, but as soon as I go to 3 \'Do\' commands I get the following error on execution of the response: [img]file:///C:/Users/Podro/AppData/Local/Temp/moz-screenshot-1.png[/img] \"The responses in this configuration may not have been written to comfort. Do you want to do this before executing this response?\" If I click yes I get the following exception code: Unhandled exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.ThrowHelper.ThrowArgumentOutOfRangeException() at System.Collections.Generic.List`1.get_Item(Int32 index) at Comfort.Form1.CommonDownload(List`1 rangeList) at Comfort.Form1.ExecuteResponse(Response response) at Comfort.Form1.ExecuteResponse_Click(Object sender, EventArgs e) at Comfort.Form1.propertyGridResponse_HyperLinkPropertyClicked(Object sender, PropertyHyperLinkClickedEventArgs e) at VisualHint.SmartPropertyGrid.PropertyGrid.OnHyperLinkPropertyClicked(PropertyHyperLinkClickedEventArgs e) at VisualHint.SmartPropertyGrid.PropertyHyperLink.OnPropertyClicked(PropertyEnumerator enumSelf, Point point, Rectangle itemRect) at ážâ .áÅâ¬(MouseEventArgs A_0) at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at ážâ .áÅâ¬(Message& A_0) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) What am I doing wrong? [img]file:///C:/Users/Podro/AppData/Local/Temp/moz-screenshot.png[/img] - admin - 04-17-2010 I believe this is a problem with executing a Response in Comfigurator rather than a problem with Comfort executing the Response. The exception is caused by Coomfigurator not handling something in the Response. Which version of Comfigurator are you using? Please upgrade to the latest, Comfigurator 3.19, see http://www.comfortforums.com/forum20/1798.html which fixes some situations causing exceptions. Even through 3.19 is still considered beta, it is quite stable in testing so far and with better functionality If this still occurs please send your cclx file to support@cytech.biz - Podro - 04-17-2010 Great - that\'s fixed it! Thanks. |