September 21, 200223 yr Hi all, the newbie attacks againI am programming a switch, called "DC Service", that allows to show a two windows, initially hidden, when click on it, but only if the battery is onMy code is here:(L:DC Service, enum)(L:DC Service, enum) ! (>L:DC Service, enum) if{ (A:Electrical master battery,bool) } 844 (>K:PANEL_ID_TOGGLE) 845 (>K:PANEL_ID_TOGGLE)844 and 845 are the ID,s of the hidden windows to show.Of course, the switch will always change position when click on it, but ONLY if the battery is connected (another switch) it will show the hidden windows.My code doesn't work, and always show the hidden windows independently of the battery position.Correct my code, please.Regards,Rafael
September 21, 200223 yr Author Rafael,Original:(L:DC Service, enum) ! (>L:DC Service, enum) if{ (A:Electrical master battery,bool) } 844 (>K:PANEL_ID_TOGGLE) 845 (>K:PANEL_ID_TOGGLE)With this example L:DC service gets queried again after it has been toggled within the same click and is checked with the BATT before the if{ toggle windows }:(L:DC Service, enum) ! (>L:DC Service, enum) + (A:Electrical master battery,bool) 1 == (L:DC Service, enum) 1 == & if{ 844 (>K:PANEL_ID_TOGGLE) 845 (>K:PANEL_ID_TOGGLE) }Also one note, you may see that I use 1 == or 0 == for arguments. That can keep things like using a single & & a m p ;much easier for code writing.. ( may not be better for comp. resources though ).. Possibly another thing, when using a ",enum" for example as a unit for a L: var, when the L:var is going to have only 2 states some rules for things like ! (not) may not work.. bool may be better. ( G:Vars work for me this way too) Just things noticed doing this stuff and not necessarily correct. Regards,Roman[link:www.packers.com]GREEN BAY PACKERS][/i :-ukliam :-beerchug FS RTWR SHRS F-111 JoinFS Little Navmap
Create an account or sign in to comment