From: Troy C. <tr...@ca...> - 2006-07-12 21:16:21
|
On Wednesday 12 July 2006 17:11, Troy Carpenter wrote: > On Wednesday 12 July 2006 17:05, Matthew Williams wrote: > > Well, actually I'm right! :-) > > > > The line in the code is this: > > > > my $Mode = ( length($data) == 2 ) ? substr( $data, 1, 1 ) : 5; > > > > If the verbose parameter is present, then the extra digit is used to > > determine the type of arming. If the verbose parameter isn't present, > > then the type of arming defaults to "5" whose ModeTxt is "armed". > > Well, that's not what happened in practice. Instead, the variable ModeTxt > was blank and showed up as such in all my web pages and log messages. > > Troy Maybe this is the problem: my @ModeTxt = ( "armed away", "armed stay", "armed Zero-Entry-Away", "armed Zero-Entry-Stay", "armed" ); There are only 4 entries in that array, not 5. So $ModeTxt[5] is blank. Troy |