ilan_sunstone
Posts: 8
Joined: Fri Feb 27, 2015 12:34 pm
Location: South Africa

Fuel Theft Alarm - script error

Fri Jan 22, 2016 4:03 pm

Hi there,

Thanks very much for the 'Fuel Theft Alarm' blog post ... http://gpsgate.com/blogComment/fuel_theft_alarm

If we copy/paste the script from the blog post, after trying to execute it in the script editor - we get the following error:

<font color="red">An unexpected error occured while parsing the script. no viable alternative at input ';' at line 15:37
no viable alternative at input ';' at line 19:37</font id="red">

We have latest patch4 etc installed.

Any ideas?

Regards,
Ilan

ilan_sunstone
Posts: 8
Joined: Fri Feb 27, 2015 12:34 pm
Location: South Africa

RE: Fuel Theft Alarm - script error

Fri Jan 22, 2016 5:29 pm

Change line 15 & 19 from

mean1 += context.state<i>;

mean2 += context.state<i>;

to:

mean1 += context.state;

mean2 += context.state;

This seems to work

ezeetraker
Posts: 51
Joined: Sun Sep 16, 2012 10:57 am
Location: India
Contact: Website

RE: Fuel Theft Alarm - script error

Thu Apr 28, 2016 8:06 am

Hi, I tested the solution and found it working ok. However, when the vehicle is running, variations do occur and therefore can be managed thru appropriate threshold levels. However, it is always a case, that vehicle is stationery when fuel theft occurs and when vehicle is stationery, we get no fuel signals with ignition off state. And also, when vehicle comes to a halt, more often with a jerk, the level recorded before stop is significantly higher or lower than the fuel level when it is starting from idle state. And this can give a false alert as though there was a fuel theft and when in reality there was no theft. The solution could give undesirable consequences.

palande
Posts: 55
Joined: Wed Feb 29, 2012 5:43 pm
Location: India
Contact: Website

Re: Fuel Theft Alarm - script error

Sat Aug 05, 2017 11:50 am

Does anyone have an idea why the script is not working? if I do the following pasted below then I dont get error but it does not detect fuel theft. The original script mentioned in the blog http://gpsgate.com/blogComment/fuel_theft_alarm does not work.
Please help

Change line 15 & 19 from

mean1 += context.state<i>;

mean2 += context.state<i>;

to:

mean1 += context.state;

mean2 += context.state;
Warm Regards
Rajesh Palande

EBTSOA
Posts: 1
Joined: Fri Sep 16, 2016 5:33 pm

Re: Fuel Theft Alarm - script error

Thu Aug 24, 2017 5:09 pm

Hi palande,

I share what I have just done,

I also did the fix as shown, but the script still did not work.

I looked at the photo, and indeed, it is necessary to replace "<" and ">" by "[" and "]"

on
mean1 += context.state<i>;
and
mean2 += context.state<i>;

I hope this will help you,

Br

Return to “GpsGate for Developers”