o I'm working on implementing the ability to monitor fuel usage ala the article Brent posted by Gil Markum. So I go the fuel flow meter (not the same exact one but a similar one that's interchangeable with the floScan. I wired it up and car runs fine. I copied in the Lua script but am getting an error.
Here is the script as I have cut and pasted from my file:
https://files.mycloud.com/home.php?bran ... uaScript_2
I run the script and get the following error:
[lua] Startup script error: ([string "-- Fuel Total..."]:27.0: 'end' expected (to close 'function' at line 12.0) near '<eof>')
Now, I am a complete moron when it comes to programming and I have zero knowledge of how this stuff works. Always been something I've wanted to learn but for some reason just can't get my head around it.
Help would be greatly appreciated. Remember to explain it to me like I'm 8 years old, assume I know nothing about this stuff...which is a good assumpton.
Thanks
Jay[/url]
Fuel Flow Script
Fuel Flow Script
A Race Car exists in 2 states: Broken or in the process of becoming that way.
i'm no lua expert but I believe you are missing an "end" command at line 27, to close the function call at line 12. try adding the word end to line 27, just above the "function onTick() command. it either has to go there or just above the --Update last count value line.
I also find using an online lua syntax checker helps find most of these errors, as well as punctuation errors. hope this helps, Dave
I also find using an online lua syntax checker helps find most of these errors, as well as punctuation errors. hope this helps, Dave