The online racing simulator
Searching in All forums
(968 results)
Gai-Luron
S3 licensed
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
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
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
Gai-Luron
S3 licensed
Hello,

You have no chance, only in your thread you have this stupid post. Don't worry, your work is great! continue man. I am very happy to see dev who spent time for other pleasure without attemping nothing. I am sure Scawen are happy to view dev community around his software. If he don't want it, he never create insim interface.

I am with you . Continue

Gai-Luron
Gai-Luron
S3 licensed
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
Gai-Luron
S3 licensed
Quote :Exactly and thats what I want for local player.

Local player and local insim app

Gai-Luron
Gai-Luron
S3 licensed
I understand,

But hide only apply on OnSpbSplit1, OnSpbSplit2..., OnSpbSplitLast. If you want your code to be hidden, put it in ths events.
In fact

OnSpbSplit1 triggered at same time than OnSplit1
OnSpbSplit2 triggered at same time than OnSplit2
OnSpbSplit3 triggered at same time than OnSplit3
OnSpbSplitLast triggered at same time than OnLap

The only difference is the hiding or no by config user.

OnSplit(X) can be hidden, no OnSplit(X)

Gai-Luron
Gai-Luron
S3 licensed
Quote :Request: Can we have the variables that LFSRelax uses, Laps of Fuel Left, Time Behind and Ahead of drivers in Race Mode only so we can add these features to our PitBoards.

No fuel left work only for a local player. You don't have info of the other player. Ahead of drivers use very much memory, i don't install it in Lapper. If player want this feature he can load LFSRelax

Quote :On the first event I have: $RemainFDIP=$RemainFDIP-1;

You can't modify buit-in var in Script ( if yes you can crash Lapper, too many risk ), only your's vars
Quote :BUG: All the new variables don't hide when using SHIFT+I to hide info.

I don't understand what you mean

Quote :IF( $DiffLapTimeToPB == 1 ) THEN $color = "^2"; ELSE $color = " ^1"; ENDIF

Now work, try this and adapt for you wish

IF( $DiffLapTimeToPB >= 0 )
THEN
$color = "^1";
$diff = $DiffLapTimeToPB;
ELSE
$color = "^2";
$diff = - $DiffLapTimeToPB;
ENDIF

privMsg( "New lap " .$color . $LapTime . "(" . $diff . ")" );

New Lapper version 5.7.1.2.

Some bug corrections and little add

Quote :+----------------------------+
|Changes from v5.711 to 5.712|
+----------------------------+
1. Fix EnterPitAction

2. Fix Idling when in pit ( teleported shift+P )

3. Fix center text in button under certain condition

4. You can call a sub or event in other event, be carrefully do not do an infinite Loop

5. Fix Swearword count

6. Remove warning messages on PENR_UNKNOWN

7. Remove warning "Sub '' not found in your config file"

8. $RotateTracks and $RotateCars are independent
if $RotateCars = "" or RotateCars = "Onecar" , rotate only on track and current car
if $RotateTrack = "" or $RotateTrack = "Onetrack", rotate only on car and this track or current track

9. Correct bug on test time value

Gai-Luron
S3 licensed
Quote :Keep up the good work Gai-Luron with your testing...

Oh no i stop testing, i find a dirty solution for this issue. I have no control on much things to do a correct investigation. I can control only my insim app.

Gai-Luron
Gai-Luron
S3 licensed
My exemple is on SplitNumber witch value is 1, 2 or 3

but $DiffLapTimeToPB is a time value. If it work on last version it's the hazard or maybe before i convert string to number on test

"0.10.10" wille be converted in 0.1 -> 1 = true
"-0.00.10" in -0.0 -> false



finally you can't do that

try
IF( $DiffLapTimeToPB >= "0.00.00" )
THEN
$color = "your color";
ELSE
$color = "other color";
ENDIF

Gai-Luron
Gai-Luron
S3 licensed
Quote from Andy King :Hi Gai,

Has the following code changed:

IF( $DiffLapTimeToPB == 1 ) THEN $color = "^2"; ELSE $color = " ^1"; ENDIF

I think the bit in red is wrong as worked fine in previous version.

Just found this:
Many modification and Upgrade in expression evaluator operator allowed:
+,-,/,*,^,==,!=,>,<,<=,>=

But unsure what some mean

Thanks

IF( $DiffLapTimeToPB == 1 )

what do you want test? this isn't correct! i don't know what you espect from this test. Before time vars are considered like string, now no!

if you want test a difference of 1 s you can put

IF( $DiffLapTimeToPB == "0.01.00" )
or
IF( $DiffLapTimeToPB == 100 )

100 = 1/100 if second

because DiffLapTimeToPB is time type

^ = pow

2^4 = 16


SwearWordsMax fixed
For messages penalty and '' is just a warning, don't worry. Removed Because you are anxious


Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello,

You are Right, the only person who can answer at all of our question is Scawen, because he can put debug info in his app.
For me button are sended to insim dedi with no issue on TCP and UDP.

Edit : a new info.
If every 30 buttons, i wait 10ms, button are displayed with no problem.
If i remove waiting, button after +/- 45 start to be displayed 1 per second. If i stop insim App. LFS client continue displaying button for a while. I presume it's LFS Dedi who flood LFS Client. But why when i put this waiting value each 30 buttons, this work fine

Scawen if you have time

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello,

For now you can't call an other sub in event or sub section.

Sub in button work only if you click on buton.

Gai-Luron
Gai-Luron
S3 licensed
Fixed EnterPitAction

For now comment it!

For the exclude to idle, before Z you are considered not on track when in pit, now yes. i take a look later.

Edit : Fixed, for now player join race

Modification on next release

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
i go to test demo, thank's for the infos

Edit : fixed demo ban/kick/spec issue. "The_saint" the next time, tell me you are using demo server , all my test are done with S2 server

Quote :+----------------------------+
|Changes from v5.710 to 5.711|
+----------------------------+
1. Fix username issue for kick/ban/spec in demo host

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Use UTF8 Editor like PSPPAD, work fine here

Hello

New stable version 5.7.1.0

look at changes.txt or news options
config file is renamed with lpr extension

Last change

+----------------------------+
|Changes from v5.706 to 5.710|
+----------------------------+
1. AvgSpeed is allowed in all player event

2. Fix $allow regression

3. Allow && ( and ), || ( or ) in expression
example:
IF( $var > 2 && $var < 5 ) THEN
...
ENDIF
4. Add new Var
$HostName -> Current host Name

Caution : Configs files before 5.7.0.0 are obsolete and use UTF8 or ansi editor like psppad to edit config file.

Open cfg/LFSLapper.lpr with UTF8 or ansi compliant ( PSPPAD -> http://www.pspad.com/fr/ ) editor, you can find Lapper.INI in doc folder and put it in pspad subfolder Syntax to have colorized lapper config file



Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Quote from Andy King :Hi Gai,
The $DiffLapTimeToPB is working fine now, sorry typed it wrong. I only have one problem left now,

$AvgSpeed is showing unknown when using it in Event OnLap()

Edit: Just done some testing on a local to me server and $AvgSpeed works here on my server but exactly the same code won't work when I run it on my hosts server. Weird eh

Thanks for your time.

AvgSpeed is only known in OnSpbLast. It's Local var, i look if i can set it as global after lap
Gai-Luron
S3 licensed
Try DiffLapTimeToPB

I look for $allow

For banlist i can't do anything.

For servername, i look for it

Gai-Luron
Gai-Luron
S3 licensed
Hello,

$allow is optionnal.

if $allow not present all player can do command.

Gai-Luron
Gai-Luron
S3 licensed
Hello,

New version 5.7.0.7

+----------------------------+
|Changes from v5.706 to 5.707|
+----------------------------+
1. Add new var
$isBestSectorSplit1 -> 1 if this sector split is best than previous Best, otherwise 0
$isBestSectorSplit2 -> 1 if this sector split is best than previous Best, otherwise 0
$isBestSectorSplit3 -> 1 if this sector split is best than previous Best, otherwise 0
$isBestSectorSplitLast -> 1 if this sector split is best than previous Best, otherwise 0

2. Remove var
$CurSplit -> Split duration for the last sector
$BestSplit -> Best Split duration for the last sector
$DiffSplit -> CurSplit - BestSplit
$BestSPB -> is the last sector is best than previous Best
$SplitNumber -> Split number

3. Remove event
OnSpbSplit

4. Add event
OnSpbSplit1 -> Event triggered when sector split is done and showsplit on config player is true
OnSpbSplit2 -> Event triggered when sector split is done and showsplit on config player is true
OnSpbSplit3 -> Event triggered when sector split is done and showsplit on config player is true
OnSpbSplitLast -> Event triggered when sector split is done and showsplit on config player is true

5. Add Var
$PBLapTime -> Current PB on current Combo
$diffLapTimeToPb -> Laptime - PBLTime

6. Now +-/* work also on time value
example
"0.10.10" + "0.01.20" = "0.11.30".

7. Fix disconnection when request button sended to fast to host ( LFS bug )

8. Add event
OnSplit1 -> Event triggered when sector split is done
OnSplit2 -> Event triggered when sector split is done
OnSplit3 -> Event triggered when sector split is done
OnLap -> Event triggered when sector split is done

Gai-Luron
Gai-Luron
S3 licensed
@Andy King : Relative to other players ? No, give me an exemple!

@Neto_r : no i think Lapper is Stable version

Gai-Luron
Gai-Luron
S3 licensed
In

List of all variables that can be used in all events

it was forgotten

$ShortTrackName
$LongTrackName

i take and modify your file config

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Yes because the correct name is

BestSectorSplit1
BestSectorSplit2
BestSectorSplit3
BestSectorSplitLast



I do mistake in change file , sorry.

if anybody wan't to complete Wiki, i have no time and my english is so bad http://wiki.frh-team.net/doku.php?id=lfslapper

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello,

I try this tommorrow. I hope this will be solve my problem.

but what i don't understand is if my insim app send request to host to query display button on LFS Client. I can put delay between buttons but for only beetween my insim app and host. I have no control under flood from host to client.

Thank's for your answer

Gai-Luron

PS: if this solution work, i try to create thread to enqueue data and send it with interval beetween request.


EDIT: Work fine with 1ms delay between 2 buttons on windows system. Strange solution. If Scawen can do anything in LFS to avoid to use this solution
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
it's not new colors var you need but $BestSPB for each split and last lap.

$BestSPB1
$BestSPB2
$BestSPB3
$BestSPBLast

or Better

One event for split1, split2, split3, splitLast, in this case you display only button for this event. When onSplit1 is reached, clear all button and create a new set.

onSPlit1, clear old button and then draw all button
onSplit2, draw only split 2
onSplit3, draw only split 3
onSplitLast, draw only splitLast

For now i give you a new version. I hope you have all var needed

Quote :+----------------------------+
|Changes from v5.705 to 5.706|
+----------------------------+

1. Add new var
$SectorSplit1 -> Last First sector Split, updated when doing new Split1
$SectorSplit2 -> Last second sector Split, erased when doing Split1
$SectorSplit3 -> Last third sector Split, erased when doing Split1
$SectorSplitLast -> Last Last sector Split, erased when doing Split1

$BestSectorSplit1 -> Best Split duration for the sector 1
$BestSectorSplit2 -> Best Split duration for the sector 2
$BestSectorSplit3 -> Best Split duration for the sector 3
$BestSectorSplitLast-> BestSplit duration for the last sector

$DiffSectorSplit1 -> $SectorSplit1 - $BestSectorSplit1
$DiffSectorSplit2 -> $SectorSplit2 - $BestSectorSplit2
$DiffSectorSplit3 -> $SectorSplit3 - $BestSectorSplit3
$DiffSectorSplitLast -> $SectorSplitLast - $BestSectorSplitLast

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
For color, use IF THEN ELSE ENDIF

IF( $SplitNumber == 1 ) THEN
$color = "^1";
ENDIF
IF( $SplitNumber == 2 ) THEN
$color = "^2";
ENDIF
Etc..

Then use this var in the displayed line

you can also test is split different to "0.00.00" to not display it

if( $Split1 != "0.00.00" )
THEN
$dispSplit1 = $Split1;

ELSE
$dispSplit1 = "";

END IF

and you display $diffSplit1

I look for other request

Gai-Luron
Last edited by Gai-Luron, .
FGED GREDG RDFGDR GSFDG