The online racing simulator
Here's what I did:
1. Firewall - disable
2. Run LFS with /insim=29999 (same as in config.lua)
3. Run luaLFS

What I got within LFS:
"luaLFS connected" message
after half a minute - "inSim guest closed: luaLFS"
There's no exceptions, debug or trace logs?

Quote from maczo :Here's what I did:
1. Firewall - disable
2. Run LFS with /insim=29999 (same as in config.lua)
3. Run luaLFS

What I got within LFS:
"luaLFS connected" message
after half a minute - "inSim guest closed: luaLFS"

No exceptions. This is the debug:
LuaLFS v1.0
Powered By Lua 5.1

This product is developed as open source software.
Please review the bundled LICENSE, NOTICE and README files for further details.

Registered 'Keepalive' module
Registered 'Lua' module
Loading core
Loading Event IDs
Loading Events
Loading API v0.1
Loading scripts/connected.lua
Loading config

Sending 1 (Sizes: Sent 44, Actual 44)
Sending 3 (Sizes: Sent 4, Actual 4)
Connection established
Calling hook connected funcs
luaLFS v1.0 connected
Sending 13 (Sizes: Sent 68, Actual 68)
sent
Calling hook prerecv funcs
PreRecv 'Keepalive'
PreRecv 'Lua'
Calling hook prerecv funcs
PreRecv 'Keepalive'
PreRecv 'Lua'
Calling hook prerecv funcs
PreRecv 'Keepalive'
PreRecv 'Lua'
(... 11kB of this)
Calling hook prerecv funcs
PreRecv 'Keepalive'
PreRecv 'Lua'
Sending 3 (Sizes: Sent 4, Actual 4)
Disconnected
Calling hook disconnected funcs
Calling hook close funcs
Closing 'Keepalive'
Closing 'Lua'
hkeepalive_prerecv: Didn't receive ISP_VER response in a seemly amount of time.

Quote from maczo :2. Run LFS with /insim=29999 (same as in config.lua)

Stupid question, do you run: LFS.exe /insim=29999 (it doesn't work), or do you run LFS.exe and you type /insim=29999 inside LFS (it should work)?
No, running LFS with in the /insim command-line switch does work.

If you are typing /insim=2999 after launch LFS (without the command-line switch) will only work if you first go into the single player or get to the server entry screen.

Quote from Kada_CZ :Stupid question, do you run: LFS.exe /insim=29999 (it doesn't work), or do you run LFS.exe and you type /insim=29999 inside LFS (it should work)?

Quote from Kada_CZ :Stupid question, do you run: LFS.exe /insim=29999 (it doesn't work), or do you run LFS.exe and you type /insim=29999 inside LFS (it should work)?

I tried both, but why wouldn't it work when typing in command line?
Quote from Hollywood :No, running LFS with in the /insim command-line switch does work.

You're right, sorry for the confusion . I run LFS from some script and I forgot to pass the commandline parameters into my script.
The inspector works OK
I'd say it's something with luaLFS then. What that is I have no idea.

Quote from maczo :The inspector works OK

auto restart
HI im trying to program a auto restart for the end of a race into LUALFS and im having trouble trying to make a sleep command. any 1 got any ideas??
my 1st lua toy :)
hi, this is my first try with Lua, it's fun to use, but it gets harder to debug as the thing gets a little bigger tho, so the code might get a bit messy

anyway it displays some timing info for qual and race, and a track position list (sth i've wanted for lfs for some time) showing info on
laps, flags, penalties etc. (see pic) all buttons are created on local machine, and simple text commands like '/o page timing' or '/o page track' can be used to switch between the two pages (so that no mouse clicks are needed, as text commands can be bound to F-keys)

i use a slightly modified version of luaLFS 1.0 api (nodelap[i] and compcar[i]) for this. In tests luaLFS generates a lot of 'BUFFER read in x bytes' output (maybe for evey mci packet there is one BUFFER output) and i don't know why. Doesn't seem like i am missing any packets tho.
Attached images
1.1-b.jpg
1.1-f.jpg
1.1-d.jpg
1.1-e.jpg
Attached files
LuaMonitor 1.1.rar - 141.5 KB - 276 views
Quote from icyocean :In tests luaLFS generates a lot of 'BUFFER read in x bytes' output (maybe for evey mci packet there is one BUFFER output) and i don't know why. Doesn't seem like i am missing any packets tho.

It does this when it gets an incomplete packet and reads it in from the global buffer, into the local buffer. It should really only be a debugging message - I've changed this in my copy.

I've not looked at your modified api yet - so forgive me if its obvious, but is there any reason to not use the originals? (If so I'll happily include them in the next update).
That looks great icyocean. I've actually been wanting to write something like that, and the timing page of formula1.com, but just making it better and more flexible . Maybe I should give luaLFS a try
Quote from the_angry_angel :It does this when it gets an incomplete packet and reads it in from the global buffer, into the local buffer. It should really only be a debugging message - I've changed this in my copy.

I've not looked at your modified api yet - so forgive me if its obvious, but is there any reason to not use the originals? (If so I'll happily include them in the next update).

i loop through the compcar[] in a set of MCIs, and when the last compcar is met (info: 128) i fire a custom event to signal a complete new set of MCIs has arrived and the UI can reload the buttons etc.

i find it easier to do this when the compcar table uses an index rather than a PLID key.
Quote from icyocean :i loop through the compcar[] in a set of MCIs, and when the last compcar is met (info: 128) i fire a custom event to signal a complete new set of MCIs has arrived and the UI can reload the buttons etc.

Just in case you didn't know, there is a bug in the compcar struct when a player is in pit, so you shouldnt rely on the compcar.Info alone..
http://www.lfsforum.net/showthread.php?t=28061
Quote from icyocean :hi, this is my first try with Lua, it's fun to use, but it gets harder to debug as the thing gets a little bigger tho, so the code might get a bit messy

anyway it displays some timing info for qual and race, and a track position list (sth i've wanted for lfs for some time) showing info on
laps, flags, penalties etc. (see pic) all buttons are created on local machine, and simple text commands like '/o page timing' or '/o page track' can be used to switch between the two pages (so that no mouse clicks are needed, as text commands can be bound to F-keys)

i use a slightly modified version of luaLFS 1.0 api (nodelap[i] and compcar[i]) for this. In tests luaLFS generates a lot of 'BUFFER read in x bytes' output (maybe for evey mci packet there is one BUFFER output) and i don't know why. Doesn't seem like i am missing any packets tho.

i cant get this to work . when i load the porgram it connects fine but i never get anything on scrren or any sign of insim any help please?
Quote from mcgas001 :i cant get this to work . when i load the porgram it connects fine but i never get anything on scrren or any sign of insim any help please?

did u press shift + b? that should bring up the UI in multiplayer or mpr.
the_angry_angel: Is the version from this post the latest one? I'm playing with it under Ubuntu, but with no success ATM. Could you always edit the first post and add the up to date link there? Thanks :-).
Quote from Kada_CZ :the_angry_angel: Is the version from this post the latest one?

Yes.
Quote from Kada_CZ :I'm playing with it under Ubuntu, but with no success ATM.

Whats up?
Quote from Kada_CZ :Could you always edit the first post and add the up to date link there? Thanks :-).

It is I've not touched luaLFS for some time.
Quote from the_angry_angel :Whats up?

Segfault in the lua code. The stack is garbled, so it's difficult to discover, what's wrong.
Quote from Kada_CZ :Segfault in the lua code. The stack is garbled, so it's difficult to discover, what's wrong.

"Meh". I'll boot up my development vm later this evening and see if I can figure out whats going on.
hi, i just want to know how to made some scripts of LuaLFS i want made triggers like !help for public use, and exemple !restart for admin use.. please can someone help me

FGED GREDG RDFGDR GSFDG