The online racing simulator
Release: LFSLapper V7.0.6.1


Hello Lapperusers,

Today we released a new version of lapper.
This "small" Lapper version contains some changes and more.

See the changelog below what we have done.

Congratulations to LakynVonLegendaus for being a Section moderator

EDIT: PLEASE GRAB VERSION 7.0.6.2 TO AVOID THE REGISTERSCHEDULEDACTION BUG


+---------------------------------------------------------------+
|Changes from 7.0.6.0 to 7.0.6.1 |
+---------------------------------------------------------------+
=================================================
Changed:
=================================================
1: GetLapperVar("racetime"); More accurate racetime.
2: Privmsg(); Can now be used in non-playerevents.
3: EditFile(); can now delete lines.
Set '-1' as $NewText and set $LineToEdit which line you want to delete.
###EXAMPLECODE###
$Filename = "TestFile";
$Folder = "C:\Users\Blah\Desktop";
$NewText = -1;
$LineToEdit = 5;
$Extension = ".txt";
EditFile($Filename,$Folder,$NewText,$LineToEdit,$Extension);

=================================================
Fix:
=================================================
1: Couldnt clear the selected objects with SetLytSelection();
-Keep the function empty to clear the selection: SetLytSelection();

=================================================
Removed:
=================================================
1: 2 functions in Sourcecode for requesting: GetLapperVars.
-Requesting Lappervars is a littlebit faster (not really noticable) and using less CPU Usage

I have just updated our servers from Lapper 7.0.4.10 to 7.0.6.1 and have two issues:

1) the following code is executed every minute, instead of once a day at 0 seconds, 0 minutes and 0 hour (start of day):


<?php 
Event OnLapperStart
()
    
RegisterScheduleAction"0 0 0 * * * *"Reinitialise_server_1 );
    
RegisterScheduleAction"30 0 0 * * * *"Reinitialise_server_2 );
EndEvent

Sub Reinitialise_server_1
()
    
cmdLFS"/msg ^1Server will be reinitialised in 30 seconds^8" );
EndSub

Sub Reinitialise_server_2
()
    
cmdLFS("/reinit");
EndSub
?>


2) my error logs are spammed with the following message:

8/19/2018 10:51:24 PM -> Error on receiving answer from web

Because of issue 1, I have reverted back to the previous version I had, as the servers are otherwise unusable restarting every minute.
Ok thanks for the bug reports. We will look into it.
Weird that noone else came with this before.

Have you tried 7.0.6.0 aswell?
No, I went straight from 7.0.4.10 to 7.0.6.1 as I hadn't much energy and time to go along with the flow.
Maybe it isn't a bug in the latest version, as I haven't tested it locally before going live (I changed pc and haven't set all things back the way they are needed), but since the code never gave me any trouble, I can't see it being a problem.
i see now its has something todo with a fix in 7.0.5.0.

13: (Priv/Host)Delayedcommand: Cannot be executed when settime is not equal with the current time.
The Delayedcommand task stays in the list and will never be executed.
Continues loops could hang. And had to be resetted manually.

i will look into it to see what went wrong.


What are you trying to receive from the web??
Do you request anything at all??
Quote from Bass-Driver :What are you trying to receive from the web??
Do you request anything at all??

There is one action that reads from a PHP file and write to a textfile (through that PHP file).
#7 - Pasci
For Linux users it will be helpful if the file extensions are all in lower case. :-)

Client OK
Connecting Servers...
>WARNING: ./drifttop.lpr doesn't exist!
WARNING: ./layoutlist.lpr doesn't exist!
WARNING: ./usertop.lpr doesn't exist!

After renaming that files this problem is fixed.
> mv drifttop.LPR drifttop.lpr
> mv layoutlist.LPR layoutlist.lpr
> mv usertop.LPR usertop.lpr

But after that I get following exception. :-(

Client OK
Connecting Servers...
>
Unhandled Exception:
System.EntryPointNotFoundException: SetConsoleCtrlHandler
at (wrapper managed-to-native) LFSLapper.ConsoleCtrl:SetConsoleCtrlHandler (LFSLapper.ConsoleCtrl/ControlEventHandler,bool)
at LFSLapper.ConsoleCtrl.Dispose (System.Boolean disposing) [0x0000f] in <2b5e2f327ac04fd29e5c7b7af7dae775>:0
at LFSLapper.ConsoleCtrl.Finalize () [0x00002] in <2b5e2f327ac04fd29e5c7b7af7dae775>:0

Any idea whats going wrong?
As far i know, does Lapper have problems with the newer version of Linux/Debain/Mono.
I have seen this error message many times. And have no solution for this problem yet.

Link with the same problem.

https://www.lfs.net/forum/post/1937835#post1937835

====================================================================
Unrelated to the problem above.

I have fixed the RegisterScheduledAction/(Host)DelayedCommand bug. Will release a testversion as soon as possible.

FGED GREDG RDFGDR GSFDG