initSer returns true/false

Discussion on the Lua Scripting capabilities for RaceCapture/Pro. Also see the <a href="http://autosportlabs.net/RaceCapturePro_Lua_Scripting">Lua Scripting Guide</a>

Moderators: JeffC, stieg

Post Reply
lightningrod
Posts: 47
Joined: Wed Oct 04, 2017 1:44 am

initSer returns true/false

Post by lightningrod »

the wiki doc:
https://wiki.autosportlabs.com/RaceCapt ... _Scripting

... indicates initSer returns 1 or -1, but the function actually returns true or false.
in lua: "1 ~= true"
so
if initSer( ... ) == 1 then
never gets here.

use:
if initSer( ...) then
works.

This took me way too long to figure out.

brentp
Site Admin
Posts: 6282
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

thanks for the note, we will fix the documentation - and sorry for the inconvenience!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Post Reply