The online racing simulator
Bug Reports
(207 posts, closed, started )
Quote from Gai-Luron :Hello,

Do you select session PB in !myconfig?

Nope, i've never heard of that...
razspb is only for session pb, no saved PB
IdleExclude function in LFSLapper
Hi,

For a while, I have a problem with the IdleExclude function in LFSLapper.
I'm using the newest version of LFSLapper, v5.9.2.5.
I'm not sure how long I'm dealing with this issue, so I can't say in which version of LFSLapper it was still working. (after v5.844 I remade my serverscript)

Explanation of the bug:
  • When I ('emit-nl') am the only one racing on the server, the IdleExclude function works fine!
  • When 'Seafalcon' is the only one racing on the server, it is working fine too.
  • When we are racing together on the server, we will both get the warning message after 60seconds and we will be spectated after being idle for 70seconds..
Could this be a bug in LFSLapper or have I made an error in my code?

My code:
##################################
#Options for idle player on track#
##################################

$IdleExclude = "emit-nl, Seafalcon"; # Usernames excluded for idle check

$OnIdleTimeout1 = 60; # Idle timeout for OnIdleAction1 in seconds

Event OnIdle1( $userName ) # Player event
privMsg( langEngine( "%{main_idle1}%" ) );
EndEvent

$OnIdleTimeout2 = 70; # Idle timeout for OnIdleAction2 in seconds

Event OnIdle2( $userName ) # Player event
cmdLFS( "/spec " . GetCurrentPlayerVar("NickName") );
privMsg( langEngine( "%{main_idle2}%" ) );
EndEvent

Thanks in advance!

Tim
!who is not working in 6.00
Hi,
I have installed ver6.00 everything works super .
Only the new !who script work not ok.
It shows only one player incase of the complete list of players.
Quote from Tim NL :Hi,
I have installed ver6.00 everything works super .
Only the new !who script work not ok.
It shows only one player incase of the complete list of players.

i have noticed this too i was wondering what happened idk if it was just me tho
Bug in who.lpr

Add line unset( $currPly ); near line 105 in who.lpr


$currUserName = $ListOfPlayersDoWho[$i];
unset( $currPly );
$currPly = getplayerinfo($ListOfPlayersDoWho[$i] );

Quote from Gai-Luron :Bug in who.lpr

Add line unset( $currPly ); near line 105 in who.lpr


$currUserName = $ListOfPlayersDoWho[$i];
unset( $currPly );
$currPly = getplayerinfo($ListOfPlayersDoWho[$i] );


My bad...I couldn't use a FOREACH as the FOR loop is required to print from user 16 to 32 on a 2 page output.

Also, the line above that unset ($currUserName = $ListOfPlayersDoWho[$i] is not required at all.
I also do a modification to avoid use of unset for var if it's assigned with getOfxxxxxx function.
hi
i think i found a bug in: GetLapperVar("LongDate")
it must show the date of the current day right.
i have made some tests few min ago and it shows the date from yesterday.

i have running lapper 24/7
and current version is:5.925

edit:
it change to the next day around 12:00 AM
i think lapper has lil problem with AM and PM
This function return server date, it's not really a Lapper Function, but system function

How is set your server date?

Gai-Luron
Quote from Bass-Driver :hi
i think i found a bug in: GetLapperVar("LongDate")
it must show the date of the current day right.
i have made some tests few min ago and it shows the date from yesterday.

i have running lapper 24/7
and current version is:5.925

edit:
it change to the next day around 12:00 AM
i think lapper has lil problem with AM and PM

you have to restart LFSLapper.EXE to change time :P
Quote from Gai-Luron :This function return server date, it's not really a Lapper Function, but system function

How is set your server date?

Gai-Luron

thx it solved
i have checked the pc where lapper is running on and it seems that the time is wrong, it was 3:00(am) and not 15:00(pm)
i dont know whats happend but i thinks it works fine now
-
(Bass-Driver) DELETED by Bass-Driver
Here a cast, there a cast...
Okay, so I am defining an array using some Consts as the index like this:

consts.lpr:

<?php 
# Membership status
const MEMBERTYPE_UNKNOWN        -1# Player has not been here before
const MEMBERTYPE_VISITOR        0# Player is a visitor
const MEMBERTYPE_GUEST            1# Player is a vouched for guest
const MEMBERTYPE_JUNIOR            2# Player is Junior Member and subject to review
const MEMBERTYPE_FULL            3# Player is a full member
const MEMBERTYPE_MAX            4# Used as a upper limit for iterators
?>

utils.lpr:

<?php 
CatchEvent OnLapperStart
()
    
### Global vars for Membership names ####
    
GlobalVar $MemberTypes;
    
$MemberTypes[MEMBERTYPE_VISITOR] = "Visitor";
    
$MemberTypes[MEMBERTYPE_GUEST] = "Guest";
    
$MemberTypes[MEMBERTYPE_JUNIOR] = "Junior";
    
$MemberTypes[MEMBERTYPE_FULL] = "Full";
    
$MemberTypes[MEMBERTYPE_MAX] = "MAX";
EndCatchEvent
?>


When I try to use that array like this:

<?php 
    $mName 
$MemberTypes[2];
?>

, I get a NULL string. Turns out that I have to explicitly cast the Const as a number to initialise the aray like this:

utils.lpr:

<?php 
CatchEvent OnLapperStart
()
    
### Global vars for Membership names ####
    
GlobalVar $MemberTypes;
    
$MemberTypes[ToNum(MEMBERTYPE_VISITOR)] = "Visitor";
    
$MemberTypes[ToNum(MEMBERTYPE_GUEST)] = "Guest";
    
$MemberTypes[ToNum(MEMBERTYPE_JUNIOR)] = "Junior";
    
$MemberTypes[ToNum(MEMBERTYPE_FULL)] = "Full";
    
$MemberTypes[ToNum(MEMBERTYPE_MAX)] = "MAX";
EndCatchEvent
?>


Hmm. Is this a problem with the parser not realising tha the Const is a numeric? Because as far as I can tell, all of the Const.lpr entries are numbers, not strings.
I think ( i am not sure ) const don't work in array Index. You can bypass it using

GlobalVar $MemberTypes;
$idx = MEMBERTYPE_VISITOR;
$MemberTypes[$idx] = "Visitor";
$idx = MEMBERTYPE_GUEST;
$MemberTypes$idx] = "Guest";
...
and so on

Gai-Luron
Quote from Gai-Luron :I think ( i am not sure ) const don't work in array Index. You can bypass it using

GlobalVar $MemberTypes;
$idx = MEMBERTYPE_VISITOR;
$MemberTypes[$idx] = "Visitor";
$idx = MEMBERTYPE_GUEST;
$MemberTypes$idx] = "Guest";
...
and so on

Gai-Luron

Looks like the same applies to CASE statements as well, where I need to explicitly cast a const to be able to use it...i.e:

<?php 
    
SWITCH( $mType )

        CASE 
ToNum(MEMBERTYPE_VISITOR):
...
etc
?>


I found a little bug a while ago. On the begin of a pitstop the pitwork must be showed, but it isn't. pitWork has to be changed to PitWork. (capital P)

privMsg( langEngine( "%{main_pitwork}%", GetCurrentPlayerVar("pitWork") ) );

must be:

privMsg( langEngine( "%{main_pitwork}%", GetCurrentPlayerVar("PitWork") ) );

Regards
Tim
Version just changed?
I'm about to show my work on the lapper to friends when i have errors leading to stand-by mode.

Everything worked great just before i went to eat about an hour ago.

I redownload the lapper, and see that its a new version.
Could this be the cause of all the sudden error's?

There is no more: Sub DisplaySpeed( $userName ) , so i cant use: RegisterNodeAction( "XXX" , 300 , DisplaySpeed,ExitDisplaySpeed );
I tryed to create it and got error's.
Node's does not exist anymore?
We cannot create variables no more?

My work seems unusable now?

What am i suposed to do?
Im confused.


I had:

Sub DisplaySpeed( $userName )
$topSpeed = GetCurrentPlayerVar("topSpeed");
$speed = GetCurrentPlayerVar("InstantSpeed");
IF ($topSpeed == 0)
THEN
setCurrentPlayerVar( "topSpeed",$speed );
$topSpeed = GetCurrentPlayerVar("topSpeed");
privMsg( langEngine( "^7Première passe: ^3{0} ^7{1} " , $speed,GetCurrentPlayerVar("UnitSpeed") ) );
ENDIF
IF ($topSpeed != 0 && $speed > $topSpeed)
THEN
$difference = $speed - $topSpeed;
setCurrentPlayerVar( "topSpeed",$speed );
$topSpeed = GetCurrentPlayerVar("topSpeed");
privMsg( langEngine( "^7N o u v e a u t o p s p e e d: ^3{0} ^7{1} ^2+{2}",$topSpeed,GetCurrentPlayerVar("UnitSpeed"),$difference));
ENDIF
IF ($topSpeed != 0 && $speed < $topSpeed)
THEN
$difference = $topSpeed - $speed;
privMsg( langEngine("^7Vitesse: ^3{0} ^7{1} ^1-{2}",$speed,GetCurrentPlayerVar("UnitSpeed"),$difference));
ENDIF
EndSub
Sub ExitDisplaySpeed( $userName )
PrivMsg( "Sorti du Speedtrap" );
/* 302 to 1019
$listOfPlayers = GetListOfPlayers();
$currTopSpeed = GetStoredValue( "GlobaltopSpeed" );
$newTopSpeed = 0;
FOREACH( $currUname IN $listOfPlayers )
{
$currTopSpeed = getPlayerVar( $currUname,"topSpeed" );
IF($currTopSpeed > $newTopSpeed)
{
$newTopSpeed = $currTopSpeed;
$unit = GetPlayerVar( "$currUname","UnitSpeed" );
$nom = getPlayerVar( "$currUname","NickName" );
}
ENDIF
}
ENDFOREACH
IF($newTopSpeed > GetStoredValue( "GlobaltopSpeed" ))
{
SetStoredValue( "GlobaltopSpeed", $newTopSpeed );
globalMsg( langEngine( "F a s t e s s s p e e d t r a p: {0} {1}{2}", $nom,$newTopSpeed,$unit ) );
}
*/
ENDIF
EndSub
Event OnLapperStart()

RegisterNodeAction( "BL1" , 300 , DisplaySpeed,ExitDisplaySpeed );
RegisterNodeAction( "BL1R" , 300 , DisplaySpeed,ExitDisplaySpeed );
RegisterNodeAction( "BL2" , 300 , DisplaySpeed,ExitDisplaySpeed );
RegisterNodeAction( "BL2R" , 300 , DisplaySpeed,ExitDisplaySpeed );
RegisterNodeAction( "FE1" , 300 , DisplaySpeed,ExitDisplaySpeed );
RegisterNodeAction( "FE1R" , 300 , DisplaySpeed,ExitDisplaySpeed );
RegisterNodeAction( "FE2" , 300 , DisplaySpeed,ExitDisplaySpeed );
RegisterNodeAction( "FE2R" , 300 , DisplaySpeed,ExitDisplaySpeed );
...

Hello,

First Check if you have error in log file. ( Log files are on log folder )

Gai-Luron
I reinstalled the same version now :5.841. Yesterday i downloaded the 5.716 in an hurry wich seems very different that's why i was so confused.
But now i cant even start the lapper. In lfs i have the message LFS Lapper In Stand By state. There is no error messages.

(I think at the first launch i had a message like can't connect to 127.0.0.1 in console.) But now nothing.

Here is the log
LFSLapper-MSS.log:
6/6/2010 11:41:19 AM -> Started - LFSLapper Version=5.8.4.1
6/6/2010 11:42:08 AM -> Started - LFSLapper Version=5.8.4.1
6/6/2010 11:43:02 AM -> Started - LFSLapper Version=5.8.4.1
6/6/2010 11:45:34 AM -> Started - LFSLapper Version=5.8.4.1
6/6/2010 11:51:35 AM -> Started - LFSLapper Version=5.8.4.1

EDIT: LFSLapper.exe is added in my firewall exceptions.
EDIT: I'v set the LFSserver.cfg to autowork and i have a lapper instance abord
LFSLapper-MSS.log:
15/02/2010 21:18:37 -> Not a connexion packet! Close connection




What am i doiing wrong?


Olivier
did u try to start lapper manual ingame
or try the latest version of lapper
problem solved: the only version that work for me is 5.926

I use windows 7

Olivier
Or 6.00
Quote from Fire_optikz001 :i have 6.0.1.0 and UserIsAdmin( $userName ) no longer works o.o

also you cant use {0:0.00%} in the languages for some reason
New version of lapper (6.010) still has bug in driftmeter.lpr.

Has main_ongooddrift - should be driftmeter_ongooddrift
in 6.0.1.0 and 6.0.1.1 when you use the {0:C} stuff in the language things it just outputs the strings asif they were just entered as {0}
This thread is closed

Bug Reports
(207 posts, closed, started )
FGED GREDG RDFGDR GSFDG