Re: [mh] Problem with timer variable
Jeff Siddall <[email protected]>
| Newsgroups | gmane.comp.misc.misterhouse.user |
|---|---|
| Message-ID | <[email protected]> |
On 11/27/18 3:56 PM, Paul Onley wrote:
> I am by no means an expert in perl but I have managed to get by OK with
> mh for about 20 years. I only use a small portion of misterhouses
> capabillities but I vary much appreciate it's incredible flexibility.
>
> I'm having a problem with some code I have written that I do not understand.
>
> In my code I have a hash of motion sensors which points to hashes of
> each room, I would like to use:
>
> set $MotionSensors{$SensorID}{timer} $MotionSensors{$SensorID}{occupied_time}, $MotionSensors{$SensorID}{timer_cmd};
>
> but get the error:
> 11/26/18 09:52:10 PM: syntax error at (eval 1086) line 4695, near "$MyMotionSen{"
> Global symbol "$benchmark_tickcount" requires explicit package name at (eval 1086) line 4723.
> Global symbol "$benchmark_tickcount" requires explicit package name at (eval 1086) line 4723.
> syntax error at (eval 1086) line 4725, near ";
> syntax error at (eval 1086) line 4746, near ";
> syntax error at (eval 1086) line 4767, near ";
> BEGIN not safe after errors--compilation aborted at (eval 1086) line 4778.
> main::__ANON__('syntax error at (eval 1086) line 4695, near "$MyMotionSen{"\x{a}G...') called at (eval 1086) line 4778
Hard to know for sure but it appears there is something strange in one
of your variables -- presumably $SensorID. Have a look at this:
syntax error at (eval 1086) line 4695, near "$MyMotionSen{"\x{a}G...
----------------------------------------------------------^
It looks to me like that scalar is somehow being set to something strange.
I would recommend temporarily commenting all the code that uses
$SensorID and instead just print $SensorID so you can find out what it
contains.
Once you know what it contains try just one line of your code and see if
you can get that to work. Once you have that working add the rest of
your code until you get it working or find the real issue.
Jeff
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users