The online racing simulator
RELEASE: LFSLapper 6.0.1.4 (closed)
(91 posts, started )
#1 - Krayy
RELEASE: LFSLapper 6.0.1.4 (closed)
I have removed the zip file as I have no time to maintain the app since I have started anew job and also my clan has stopped racing LFS. We may restart IF v3 ever comes to light, however until then, it's been good fun.
Hi all,

Here's the latest incremental update to Lapper that contains a few new functions and some bug fixes that are listed in the changes.txt file.

WARNING: This update includes additional functions that must be present in the LFSLapper.lpr file, so if you have customised your main file, see the upgrading from 6012 file in the docs directory for how to hand edit those customisations otherwise it will break.

In order to make this version more stable, I have decided to make this a more bare bones installation, moving a number of lesser used modules into the "optional" include directory. The modules in there may require some extensive rewrites for them to be 100% stable.

NOTE: A lot of the web based functions need a valid PubIDK, so get one issued on LFS World and put it into the MyInc.lpr file.


CIF is there for a lot of functions like setting handicaps (!hc), member status and permissions (!ma) and a replacemnt for !top, but a number of the included modules are still beta as I don't have a lot of time to take them to their conclusion. use what you want and comment out the rest in the addonsused.lpr

As per Gai's release thread:


<?php 
Special thank
's

The original program was written by MonkOnHotTinRoof. I had his  permission to maintain and develop it because it stopped the  development. Thank'
s a lot Monkter for your initial prog ;)

Dev Team
Gai
-Luron Coder
Krayy 
Additional Code and Scripts
Yisc
[NL] : Support Script Coder

This program is free software
you can redistribute it and/or modify
    it under the terms of the GNU General 
Public License as published by
    the Free Software Foundation
either version 3 of the License, or
    (
at your optionany later version.

    
This program is distributed in the hope that it will be useful,
    
but WITHOUT ANY WARRANTYwithout even the implied warranty of
    MERCHANTABILITY 
or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General 
Public License for more details.

    
You should have received a copy of the GNU General Public License
    along with this program
.  If notsee <http://www.gnu.org/licenses/>.
?>

Warning:This has been put together fairly quickly, so any issues, let me know and I'll try to set them right as soon as possible. Treat this as a beta until you have ported your Lapper.lpr mods and please don't try to just drop your current lapper.lpr file in here, as you need the extra functions defined (see note above).

Good luck all.

This version should be more compatible with Mono as that is what it is compiled under

Bugs squashed
* Error on player disconnect due to OnDisconnect event being triggered prior to removing players UCID from connection list
* Removed forcing distToDo to be a minimum of 100
* Fixed issue with OnFastDrivePits
* Some spelling errors
* General tidy up of sapcing in LFSLapper.lpr
* Added code for "isNum" function to test if a value is a valid number (fix race_duration)

(Also, I've started adding subversion numbers on the zip file so I know where I'm up to)

* Added Gai Luron's extra code to handle the new InSim code for queueing packets
Looks like you've been busy!

Well done. Glad to see lapper still being updated.

Just had very quick look thru things and in the LFSLapper.lpr file, you've duplicated the Event OnButtonFunction - first one has the debug part commented out.
#3 - Krayy
Quote from sinanju :Looks like you've been busy!

Well done. Glad to see lapper still being updated.

Just had very quick look thru things and in the LFSLapper.lpr file, you've duplicated the Event OnButtonFunction - first one has the debug part commented out.

Noted. Thanks for the feedback
Some feedback on the latest Lapper (6.0.1.3) version:
------------------------------------------------------

The log file reports:

Wrong value for $distToDo, set to 100

While the default config file has this:

$distToDo = -1;

According to the text, -1 should disable that feature, but apparently that isn't working as it is supposed to do.

------------------------------------------------------

Log file is also reporting this at every (re)start of Lapper:

Can't open group file : ./default/./Text_Files/admin1.txt
Can't open group file : ./default/./Text_Files/admin2.txt

After disabling most addons, the error is gone, so it must come from one of the addons.

-------------------------------------------------------

Arrays are still broken.
When adding this to the OnConnect_Pitboard event:

dumpVar ($user_array);

The output is:

---- Dump of user_array ----
$user_array[1,4] = ""
$user_array[1,5] = "^4[R-R]^7Yisc[NL] ^s3"
$user_array[1,6] = 1
$user_array[1,7] = 0
$user_array[1,8] = 0
---- End Dump of user_array ----

The expected output would also show the values in $user_array[1,1] , $user_array[1,2] , $user_array[1,3]
#5 - Krayy
The files admin1.txt adn admin2.txt are not part of the standard distribution so may be part of a custom lpr file. Do a text search and find out which file they are in and look to changing the code to use the UserIsAdmin function to check in they are an admin.

To check the user_array issue I need to see the code surrounding it as without context (i.e. what is setting it) there is no reference point
Quote from Krayy :The files admin1.txt adn admin2.txt are not part of the standard distribution so may be part of a custom lpr file. Do a text search and find out which file they are in and look to changing the code to use the UserIsAdmin function to check in they are an admin.

To check the user_array issue I need to see the code surrounding it as without context (i.e. what is setting it) there is no reference point

I've done a search and found admin1.txt and admin2.txt being a part of listevent.lpr, which isn't mine and which is included in the standard Lapper distribution

I've attached my Pitboard code, which uses the array I mentioned.
Attached files
pitboard.txt - 127.1 KB - 376 views
Could you also have a look at the "RaceControl" section.
I believe there is a problem with that part of the code for ages and I had correspondense about it with Gai in the past, but it still isn't working properly.

When I set:

$InRaceLapsVoteMinMax = "0-0";

This should mean that voting is never allowed, but after a certain amount of time (I think Lapper reads this LFS value: /rstmin=) , people can still start voting.

When I set:

$InRaceLapsVoteMinMax = "999-";

This should mean that voting is allowed from lap 999 till the end of the race, but voting is allowed from lap 1.

When I set:

$InRaceLapsVoteMinMax = "-";
$VoteRestart = 99;
$VoteLifeSec = 30;

This means voting is always allowed, when 99% of the people have voted, a restart will be done and votes will last for 30 seconds.

When I then set this:


Event OnVoteRestartChange($PlayerOnTrack, $Vote , $Need) # Lapper Event
CmdLFS ("/cv");
openGlobalButton( "bargr1",60,1,10,6,6,30,96,langEngine( "%{main_vote_restart1}%"));
openGlobalButton( "bargr2",70,1,20,6,6,30,96,langEngine( "%{main_vote_restart2}%",$Vote,$PlayerOnTrack,$Need ) );
EndEvent

A message is displayed that the vote is cancelled, but the number of votes still stays at one for 30 seconds. So while LFS cancelled the vote, Lapper doesn't take this in account.

The reason I would like this to work properly, is to stop people on Demo servers from voting for restarts over and over again. Best solution so far is to set this:

$InRaceLapsVoteMinMax = "-";
$VoteRestart = 99;
$VoteLifeSec = 1;

But I would rather see this working to stop any voting immediatly:

$InRaceLapsVoteMinMax = "0-0";
#8 - Krayy
The problem with the voting looks like the logic used to determine what lap the race is on. Lapper has this internal code:

<?php 
                
if (currRace.inRace == false || (currRace.inRace && currRace.lapsDone >= InRaceLapsVoteMin && currRace.lapsDone <= InRaceLapsVoteMax))
?>

And reading it it look slike if you have 0 as the max lap to start voting, the last part check if the lapsdone is less than or equals to 0 and so allows the vote on lap 1.

I'll modify the logic in the binary for the next update.
hi there,
I'm trying to make lapper for our server (DELTA TEAM™ Drift Public - we are around for like 3-4months now). But every time when I'm trying to run LFSLapper.exe it just crashes. And since lfs-lapper.org is not working I'm not able to get manual to see, if I'm doing something wrong. Anyone can help me with this problem, please?

PC:
W7 Ultimate x64
Intel Core Duo @2,3ghz, 3gb ram, nVidia ION 256mb shared memory
^if it help
Quote from m.stix.b :hi there,
I'm trying to make lapper for our server (DELTA TEAM™ Drift Public - we are around for like 3-4months now). But every time when I'm trying to run LFSLapper.exe it just crashes. And since lfs-lapper.org is not working I'm not able to get manual to see, if I'm doing something wrong. Anyone can help me with this problem, please?

PC:
W7 Ultimate x64
Intel Core Duo @2,3ghz, 3gb ram, nVidia ION 256mb shared memory
^if it help

Can you upload the log file of Lapper, so we can see what happens?
By default you can find the log file at: \bin\default\logs
Then we would need the *ERR.log
theres only one line in it
and its not from my session
15/02/2010 21:18:37 -> Not a connexion packet! Close connection

EDIT: damn my bad, took it from another folder, but nvm..
I dont have any 'ip-port-err.log here. Just MSS.
MSS here:
2/15/2010 9:14:00 PM -> Connecting to 127.0.0.1 / 29999 ..2/15/2010 9:14:11 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
2/15/2010 9:15:15 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
2/15/2010 9:16:19 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
2/15/2010 9:17:24 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
2/15/2010 9:18:28 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
2/17/2010 11:41:46 PM -> Connecting to 127.0.0.1 / 29999 .2/19/2011 4:30:44 PM -> Connecting to 127.0.0.1 / 29999 .3/9/2012 2:51:39 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 2:53:30 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 2:55:20 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 2:56:24 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 2:57:29 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 2:58:34 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 2:59:38 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 3:00:43 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 3:01:47 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 3:02:52 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 3:03:57 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 3:05:01 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 3:06:06 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 3:07:11 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 3:08:15 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 3:09:20 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 3:10:24 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 3:11:29 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 3:12:34 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/9/2012 3:13:38 PM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/12/2012 12:06:34 AM -> Connecting to 127.0.0.1 / 29999 ...Ko
3/12/2012 12:07:38 AM -> Connecting to 127.0.0.1 / 29999
Connection OK
3/12/2012 12:09:07 AM -> Connecting to 127.0.0.1 / 29999
Connection OK
3/12/2012 12:28:38 AM -> Connecting to 127.0.0.1 / 29999
Connection OK
3/12/2012 12:48:22 AM -> Connecting to 127.0.0.1 / 29999
Connection OK
3/12/2012 4:46:55 PM -> Connecting to 127.0.0.1 / 29999
Connection OK
3/12/2012 4:47:14 PM -> Connecting to 127.0.0.1 / 29999
Connection OK
3/12/2012 7:30:06 PM -> Connecting to 127.0.0.1 / 29999
Connection OK

Okay, so let's go through how to set up Lapper to talk to your server and see if this solves your problem:

1) In the LFS server directory, check the stup.cfg file for the following lines:


<?php 
// host name
/host=LFS-DEV

// optional: password
/pass=password

// optional: admin password
/admin=testing

// optional: InSim port
/insim=31993

?>


This means that my test server will be running InSim on port 31993 with the admin password "testing".

Next check your Lapper config files. Firstly the LFSServers.cfg file in teh Lapper directory:

<?php 
#    Configuration of LFSServer to be Managed with LFSLapper
# One line per server
# Remote port is the port used to manage LFSLapper remotely, future extension
# One remote port per LFSLapper on one machine, autoStart is optionnal
#Unique ID|GroupId|Ip|Port|WorkDir|IniFile|autowork
timeOutScript=2000;
remotePort=3001;
DEF1|gr1|127.0.0.1|31993|./default|default_1.ini|autowork
?>


here I have 1 Lapper instance that connects to an InSim on port 31993 and has its config in the default_1.ini file that resides in the ./default/ directory.
The default_1.ini file contains:

<?php 
$password 
"testing";
$configFile "LFSLapper.lpr";
$superUsersFile "superusers.txt";
?>

As you can see the password in this file matches the password set on my Lapper server so that it will connect as an Admin user.

Check all those configs and get back to us.
Ok, thanks, I showed myself as noob once again.
Just didn't changed password in default1.ini...

Thanks for help, it's nice to see you guys will help even to demo licensed player.
Great to see you are sorted, enjoy discovering all the possibilities of Lapper (which are many).
playerVars
Can the playerVars.txt file be added back into the /doc folder please - it's a handy little document for me looking up things I may want to use.

Also - your list of lapper events in another thread (HERE - Post #5) would also be handy to have in a text document.
Quote from Yisc[NL] :I've done a search and found admin1.txt and admin2.txt being a part of listevent.lpr, which isn't mine and which is included in the standard Lapper distribution

I've attached my Pitboard code, which uses the array I mentioned.

Right, arrays...I'll create a post on how to use them properly (at least as far as I can make out - that part of the code is very tricky) but the bottom line is that the way you're using them for the $user_array was sort of deprecated when lapper jump to v6.

There is nothing in the functions that use $user_array that you cannot duplictae with the getListOfPlayers function and using stored values. I'll have a look at rewriting your pitboard.lpr script to use those functions which will save all the hasle of trying to force the array structures to behave themseleves.
Hey all,

Please note that we have found some issues with a few of the lpr includes so will update them asap and hopefully get up a version that works as adevrtised out of the box
That site is only in French
And as soon as you click the English flag, the page cannot be found.
Both flags are pointing to a non existing URL.
Attn: Krayy - corrected driftmeter.lpr
For the next update, can you replace the existing driftmeter.lpr (in the /includes directory) with the attached please?

A couple of bugs had crept into the driftmeter.lpr file (namely main_ongooddrift, which should have been driftmeter_ongooddrift, and the french letter é showing incorrectly as é).

I've also tidied up the code by getting rid of the huge amount of closePrivButtons with use of closeButtonRegex, which makes things easier to follow.
Attached files
driftmeter.zip - 4.3 KB - 415 views
Quote from sinanju :For the next update, can you replace the existing driftmeter.lpr (in the /includes directory) with the attached please?

A couple of bugs had crept into the driftmeter.lpr file (namely main_ongooddrift, which should have been driftmeter_ongooddrift, and the french letter é showing incorrectly as é).

I've also tidied up the code by getting rid of the huge amount of closePrivButtons with use of closeButtonRegex, which makes things easier to follow.

Done
Some where should I download the lapper ??? I can't see any download link Nice work again thx for the effort and free time for continue developing the lapper !!!
Quote from sarxes :Some where should I download the lapper ??? I can't see any download link Nice work again thx for the effort and free time for continue developing the lapper !!!

I'm just adjusting some of the lapper addons to suit the new version and will repost shortly
LSFLapper mono
Hi,
i try to run the Lapper with mono and become the following error:
"Error on connect to server DEF1 IP/30079 retry in 1mn"

please help...

RELEASE: LFSLapper 6.0.1.4 (closed)
(91 posts, started )
FGED GREDG RDFGDR GSFDG