The online racing simulator
LFSLapper insim4 Release
(2101 posts, closed, started )
Hi Gai,
Tried new version after I got in from work last night and was getting openprivbutton errors, not sure what errors as slept since then, will try again in a bit and report more accuratley.

BUG: `openPrivButton` parameter #1 is wrong type at line #89
This is line 89:
openPrivButton( "welc",25,50,150,15,12,-1,0,"^3Welcome " . $Nickname . " ^3to our Racing Server" );
If I comment it out with # the error just moves to next openPrivButton. Hope this helps.

BUG: Getting lots of host : 0 messages from Lapper in game, could be to do with above bug.


Quote :No fuel left work only for a local player.

Exactly and thats what I want for local player.


Quote :Ahead of drivers use very much memory

OK any chance of us having it available on each split and crossing start/finish like it is on a real PitBoard.


Gai come take a look at my PitBoard, its available to view at [AKM] Racing UK 2

Can someone explain how to use the TrackInfo.zip file, I want to adjust my trackinfo.cfg using our servers PB.txt file like it says in ReadMe but cannot work out how to run it. Keep getting login errors about my pubstat access.

Thanks for your dedication Gai its very much appreciated.
Quote :Exactly and thats what I want for local player.

Local player and local insim app

Gai-Luron
Hi Gai,
Whats wrong with this line of code please.....

IF( $Nickname == "Unnamed"||"unnamed"||"Driver"||"driver"||"Racer"||"racer" )

It works on Unnamed but not on any of the others, as if its not recognising the || which means OR doesn't it.
Sorry for the button issue, i put the wrong exe in distrib, reload it!

Quote from Andy King :Hi Gai,
Whats wrong with this line of code please.....

IF( $Nickname == "Unnamed"||"unnamed"||"Driver"||"driver"||"Racer"||"racer" )

It works on Unnamed but not on any of the others, as if its not recognising the || which means OR doesn't it.

IF( $Nickname == "Unnamed" || $Nickname == "unnamed" || $Nickname == "Driver" || $Nickname == "driver" || $Nickname == "Racer" || $Nickname == "racer" )
THEN
...

|| mean or
I'm trying to use "closePrivButton" or "privMsg" Race action section but then receive the message "you can't use privMsg in this context, not a player event at line #...."
I've solved this problem by using "cmdLFS" but shows my command in chat.
Therefor I hope it is relatively easy for you to implement "open/closePrivButton" or "privMsg" in the race action section, so I can use that when a race restarts.
Hello,

Race restart it's not a player event and Lapper can't know player who have triggered this event. I hope you understand what i mean! In this case you can't use privMsg and button for a particular player.

But you are rigth openGlobalButton must be active and closePrivButton also. I look for it.

Gai-Luron
I cleaned up the config-file and added a new section with commands which have been added lately:

Other variables that could be used on expressions

&& -> and
|| -> or
+ -> plus
- -> minus
/ -> devide
* -> multiply
^ -> pow
== -> equal to
!= -> not equal to
> -> bigger then
< -> smaller then
<= -> smaller then and equal to
>= -> bigger then and equal to

File is attached
Attached files
LFSLapper.txt - 44.2 KB - 303 views
I'm very confused at the moment. I'm trying to work out how $DiffSectorSplitn works but can't get a hold of it. As far as I can see in the documentation it should be:

DiffSectorSplitn -> $SectorSplitn - $BestSectorSplitn

But if I drive a 1st sector of 0.44.44 (start of the race) with a best 1st sector of 0.31.12 (so the diffence is 0.13.32 (which is correctly displayed when using $DiffSectorSplit1)) it still says I'm over 1 second faster in that section when I use the following code:

Event OnSplit1()
IF ($DiffSectorSplit1 > "0.01.00")
THEN
openPrivButton( "1st_split",2,121,30,5,5,10,16,"^1you're > 1 sec slower" );
ENDIF

IF ($DiffSectorSplit1 > "-0.01.00")
THEN
openPrivButton( "1st_split",2,121,30,5,5,10,16,"^2you're > 1 sec faster" );
ENDIF

openPrivButton( "1st_split_b",2,131,30,5,5,10,16,"Dif: " . $DiffSectorSplit1 );
EndEvent

In my 2nd lap I drove a 1st sector of 0.31.25 (so the difference is 0.00.13) again it says I'm over 1 second faster then my best 1st split, which is incorrect ofcourse. It shouldn't give a message at all since I'm not a second slower or faster then my best 1st split. So I think $DiffSectorSplitn is compared to the last lap driven and then it's logical to give the message that I'm over 1 second faster since my time is 0.13.19 faster then the previous lap. I've attached 2 screenshots and the code used is already in this post.

[edit]
I've tested this with Lapper 5.711 and 5.7121
[/edit]
Attached images
lap1.png
lap2.png
its just a simple mathematic thing :-D

there is just a little mistake in here:

IF ($DiffSectorSplit1 > "-0.01.00")

but it has to be

IF ($DiffSectorSplit1 < "-0.01.00")

because 0,13 > -1 so everything, exept times that are more than 1 sec faster would be "1 sec faster"

just change that and it should work

i have got some similar code in my lapper and there it works
Hello,

Yes rigth

You can replace also

IF ($DiffSectorSplit1 < "-0.01.00")

with

IF ($DiffSectorSplit1 < -100 )

Because time value are 1/100 of second time. But the two line work, Lapper do the conversion to put it in good format.

example:
"1.10.12" = (1*60*100) + (10*100) + 12 = 7012 in 1/100 of second

PS: guys i just want to say you when you call sub, event and function, when you use test with IF...THEN..ELSE...ENDIF, when you use expression, like concatenation, add, sub, boolean expression with && and ||, you create a prog and you're a dev. this is the base of the programmation. If you look a real language, there are much add-on only to help you to dev quickly like var structured and loop block, but bases are the same. think about this


Gai-Luron
Sorry guys, for the first time is this project I really feel like an idiot.
Let's say I should have gone to bed earlier instead of asking such stupid questions.
Thanks for the help, I changed the code and it's working like a charm.
Hello,

No problems, there aren't stupids questions, sometime only stupids answers .

Gai-Luron
Quote from Yisc[NL] :Sorry guys, for the first time is this project I really feel like an idiot.

mmm Been there and got the T-Shirt, Video, DVD and now Blue Ray lmao
Hi Gai,
I have just had a brain wave about the time difference between racer infront and racer behind.

What about making LFSRelax's buttons more configurable like Lappers are. This means I could edit LFSRelax.cfg to suit my PitBoard, so it fits in seamlessly. I could then post it on my website and if racers wanted to use the RaceBoard part of my PitBoard they could download it and run LFSRelax.

Then both programs would compliment each other.

What do you think, good idea or what lol
Found a small bug in Lapper 5.7121 , when 2 people have the same laptime. They are displayed on top of each other when showing !top (car). See attached screenshot.
Attached images
bug_lapper_57121.png
Why are you on pos 3 and 4. You have 2 licences?

So strange this picture, i don't understand

Can have your PB file to test it?

Gai-Luron
Hello everybody,

I need a big big PB.txt file to do some test. thank's in advance

Gai-Luron
Quote from Gai-Luron :Why are you on pos 3 and 4. You have 2 licences?

So strange this picture, i don't understand

Can have your PB file to test it?

Gai-Luron

Sorry that I didn't mention this earlier.
I always have that problem when going from one version of Lapper to another.
My name (but also othernames) end up twice in the PB-file.
No I only have one license.
I've attached my PB file so you can have a look at it.

Futher I'll take the liberty to expres some wishes for a future version of Lapper.

- variable to display next track in rotation schedule
- variable to display next car in rotation schedule
- variable to display number of races left before rotation is done
- possibility to open/close buttons on race restart
- possibility to reduce value $RemainFDIP when a false start is made
- variable to wait for extra input when execution /kick or /ban (like {*} we had in 5.x version) (I really 'need' this one to complete my admin-panel)

At last I noticed some strange behaviour last night. When you are racing and a new player connects to the server, value $DiffSectorSplit1,2,3,Last aren't displayed for some time and then suddenly returns on screen. I think this has to do with the insim-protocol updating it's arrays or something like that and therefor I think this can't be solved. Still I like to mention it in case you say: ah okay, I know what's happening and that can be solved in the future.

I hope you don't mind that I'm writing such a big answer with again lots of requests in it. I'm not ungratefull at all and I can't thank you enough for all the work you have done on the wonderful program. I'm trying to give you directions to make it even better and you will take this comments in the way I just said. Anyway, thanks again Gai! You really are my developing hero!
Attached files
PB_RR_PUBLIC_DEMO.txt - 18.9 KB - 295 views
Quote from Gai-Luron :Hello everybody,

I need a big big PB.txt file to do some test. thank's in advance

Gai-Luron

Here's big PB-file of 425 KB.
Attached files
PB_RR_Endu.txt - 425.5 KB - 429 views
Ok, i understand now, it's a demo server. It's normal you have two line with your nickname. Because before patch Z LFS don't send username but nickname in demo mode. I save PB with nickname as username. Now all player have username and for Lapper it's a new entry. Erase your PB file.

For the wish, i put in on Todo, for now i look for other interesting things

Gai-Luron

PS : it's demo file, do you have a big licensed file?
Quote from Gai-Luron :Ok, i understand now, it's a demo server. It's normal you have two line with your nickname. Because before patch Z LFS don't send username but nickname in demo mode. I save PB with nickname as username. Now all player have username and for Lapper it's a new entry. Erase your PB file.

For the wish, i put in on Todo, for now i look for other interesting things

Gai-Luron

PS : it's demo file, do you have a big licensed file?

Ah okay, that makes sense. I'll delete the PB-file and we will start from scratch
No I haven't a licensed file only. I run 7 servers with 5 being S2 and 2 being demo, so my PB-files (which are synchronised using Lapper) are mixed.
Found another small bug in 5.7121 on idle time-out.
I have the following code:

$OnIdleTimeout1 = 20;
$OnIdleTimeout2 = 30;

First message is sent after 10 seconds, spectate is executed after 20 seconds.
Quote from Andy King :If I press SHIFT+I I can press HIDE to stop lapper showing me splits and laptimes like before. Now Lapper only hides the original variables and not the new ones so HIDE doesn't hide everything anymore. You need to add new variables to HIDE config so racers can hide splits, laptimes like they used to.

Hi Gai,
Can you review this, if racers don't want to see Lapper Splits, Laptimes, SPB and AvgSpeed they cannot switch them off. If they press SHIFT+I and click Hide it doesn't hide any of the new variables I am using. This means Racers are being forced to see these timings.

Just had a Racer tell me the mouse cursor shows all the time with mouse steering and they think its because of Lapper, any ideas??

Can someone explain how to use the TrackInfo.zip file, I want to adjust my trackinfo.cfg using our servers PB.txt file like it says in ReadMe but cannot work out how to run it. Keep getting login errors about my pubstat access.
Quote from Andy King :
Can someone explain how to use the TrackInfo.zip file, I want to adjust my trackinfo.cfg using our servers PB.txt file like it says in ReadMe but cannot work out how to run it. Keep getting login errors about my pubstat access.

Hi Andy,

In your LFSLapper.lpr
#################################
# Local variable
# {SplitTime} - Split time
#################################
Sub TRI_split1_0()
cmdLFS( "/msg Great 1st split (" . $SplitTime . ") by " . $Nickname . "^8!" );
EndSub
Sub TRI_split1_1()
cmdLFS( "/msg Good 1st split (" . $SplitTime . ") by " . $Nickname . "^8!" );
EndSub

In your trackInfo.cfg
track = AS3
len = 5.6
car = FXR
MaxLapTime = 3.22.52
split1 = 0.44.97:0.45.64
lapTime = 1.41.76:1.43.28

The red one in trackinfo.cfg show the great 1st split in your LFSlapper.lpr
and The green one in trackinfo.cfg show the good 1st split in your LFSlapper.lpr

And your $PubStatIdk ="TH1sAFaK31XxP0p5YjJr7mP99GLgwiB5n"; is something like this.
You can get one on www.lfsworld.net - My LFSW setting - generate an additional Ident-Key.
Wow, I just have to post here about my first race with the new Lapper version. It was awesome. My pitboard is working like a charm with constant updated sector and TPB times, messages about winning/losing time per sector and the new feature of displaying good/great splits of everyone worked superb. Wow, what a great experience that was.
Attached images
pitboard.gif
This thread is closed

LFSLapper insim4 Release
(2101 posts, closed, started )
FGED GREDG RDFGDR GSFDG