RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
Fuel Flow Script
Author Message
Reply with quote
Post Fuel Flow Script 
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?brand=webfiles&seuuid=38a354f1de601c85b841bfcf0c71fa4f&name=LuaScript_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]


_________________
A Race Car exists in 2 states: Broken or in the process of becoming that way.
View user's profile Send private message
Reply with quote
Post  
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

View user's profile Send private message
Reply with quote
Post  
There is actually an "end" in both of those places.


_________________
A Race Car exists in 2 states: Broken or in the process of becoming that way.
View user's profile Send private message
Reply with quote
Post  
yea, I was going by the script error. when I put the entire script into tutorialspoint.com online checker it comes back with no errors. sorry, man. I tried.

View user's profile Send private message
Reply with quote
Post  
Following up, did you get your script to work yet?


_________________
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum