The online racing simulator
Searching in All forums
(446 results)
Krayy
S2 licensed
Actually, I'm still getting the error:

12/31/2009 10:28:33 AM -> Syntax error in cfg file Need a item identification on file : "LFSLapper.lpr" at line #1743

in the log file, so it looks like it's still broken somewhat
Krayy
S2 licensed
This works for me (even though I cannot understand it):

<?php 
Lang 
"NO" #Translated by Carlos/DenonForce14
    
main_welc1 "^7Velkommen{0} ^7til ^1LFSLapper ^7forsynte servere!%nl%^2Press ^7!help ^2etter du har forlatt garasjen for å se kommandoer";
    
main_welc2 "^7Din vennlige posisjon (alle seere) : ^7{0}%nl%^2Din aktuelle prekvalifasjon i liga : {1}^6Anslått Sammenslutning : {2}%nl%Ikke bruk banneord på denne serveren og respekter andre, ellers kan du bli utestengt";
    
main_accept "Godta";
    
main_deny "Avslå";
    
main_speedtrap "SpeedTrap = {0} {1}";
    
main_gotlevel "^3Du har level: {0}";
    
main_swear11 "^1Ikke bruke dette ordet på denne serveren.";
    
main_swear12 "Du havner i tilskuermodus ^2{0} ^1hvis du bruker et banneord igjen.";
    
main_swear21 "For mange banneord, du blir satt i tilskuermodus";
    
main_nomatchflag "Flagg samsvarer ikke nødvendige flagg";
    
main_yourflag "Dine flagg -> {0}";
    
main_requiredflag "Nødvendige flagg -> {0}";
    
main_spectated "Tilskuermodus";
    
main_notadmin "Du er ikke en adminstrator!";
    
main_currnode "Gjeldende klynge er : {0}";
    
main_currzone "Gjeldende område er : {0}";
    
main_lapclose "LFSLapper ble slått av av administrator!";
    
main_ban "{0} Utesteng {1}";
    
main_kick "{0} frakoble {1}";
    
main_friendpos "Din vennlige posisjon er {0}";
    
main_groupqual "Din gruppekvalifisering er {0}";
    
main_level "^3Du har level(s): {0}";
    
main_dist "Distanse gjort på {0}/{1} = {2} {3}, session = {4} {5}";
    
main_lapdone "Runder gjort på {0}/{1} = {2}, session = {3}";
    
main_timeinpit "Tid i pit {0}";
    
main_trackused "Bane i bruk : {0} = {1}";
    
main_serverclock "Server tid : {0}";
    
main_midnight "Nattvarsel til alle arbeidende menn!";
    
main_newyear "Godt nyttår!";
    
main_allowed "{0}^3 tillatt på denne serveren";
    
main_notallowed "{0}^3 ikke tillatt på denne serveren";
    
main_tolowhand1 "{0}^3 satt i tilskuermodus pga for lite handicap";
    
main_tolowhand2 "^3trenger {0}kg og {1}% av inntak begrensning!";
    
main_vote_restart1 "Start løp på nytt:";
    
main_vote_restart2 "({0}/{1}) trenger {2}";
    
main_vote_qualify1 "Kvalifisering";
    
main_vote_qualify2 "({0}/{1}) trenger {2}";
    
main_vote_end1 "Slutt:";
    
main_vote_end2 "({0}/{1}) Trenger {2}";
    
main_car_changed "Bil endret, gå til garasje. Bil i bruk = {0}";
    
main_track_changed1 "Banen er endret, vent litt!";
    
main_track_changed2 "Bane i bruk = {0}";
    
main_left_server "{0} ^7forlot serveren";
    
main_great1 "Utmerket 1st split ({0}) by {1}^8!";
    
main_good1 "Bra 1st split ({0}) by {1}^8!";
    
main_great2 "Utmerket 2nd split ({0}) by {1}^8!";
    
main_good2 "Bra 2nd split ({0}) by {1}^8!";
    
main_great3 "Utmerket 3rd split ({0}) by {1}^8!";
    
main_good3 "Bra 3rd split ({0}) by {1}^8!";
    
main_greatlap "Utmerket runde ({0}) by {1}^8!";
    
main_goodlap "Bra runde ({0}) by {1}^8!";
    
main_help1 "^2Kommandoer";
    
main_help "^2Generelle kommandoer"
            
"%nl%^3!myconfig ^8Gjør lapper best mulig for deg"
            
"%nl%^3!mypb ^8Din LFSWorld PB liste"
            
"%nl%^3!ps ^8Din stats info eller !ps brukernavn"
            
"%nl%^3!who ^8Spilleres stats på serveren"
            
"%nl%^3!top ^8Topp spilleres kjøreinfo"
            
"%nl%^3!drf ^8Topp spilleres drifteinfo"
            
"%nl%^3!stats ^8Din kjøreinfo på nåværendebane"
            
"%nl%^3!dstats ^8Andres kjøreinfo på nåværendebane"
            
"%nl%^3!near ^8Et vindu som viser 14 spillere med rank i forhold til deg"
            
"%nl%^3!spb ^8Split tider og TPB (Teoretiske PB)"
            
"%nl%^3!razspb ^8Start ny pb samling (eg når du skifter bil)"
            
"%nl%^3!track ^8Navnet på nåværende bane"
            
"%nl%^3!time ^8Server tid (for ligamøter)"
            
"%nl%^3!ver ^8Versjon av LFSLapper"
            
"%nl%"
            
"%nl%^2Spesielle Liga kommandoer"
            
"%nl%^3!topqual ^8Spilleres rank spesifisert på *.flt file"
            
"%nl%^3!statsqual ^8Akutell posisjon i prekvalifisjon"
            
"%nl%"
            
"%nl%^2Nye funksjoner"
            
"%nl%^3!laps ^8Totalt antall runder + antall runder"
            
"%nl%^3!hand ^8Viser handicap info"
            
"%nl%^3!pit ^8Totalt pit stop tid"
            
"%nl%^3Shift+i ^8Konfigurer lapper vinduene"
            
"%nl%^3!closepb ^8Avslutt Pitboard foreløpig"
            
"%nl%^3!config ^8Konfigurer Pitboard"
            
"%nl%^3!ctrack ^8For å skifte bane (Bare admins)"
            
"%nl%^3!pitwindow ^8Vis nåværende Pit vindu"
            
"%nl%^3!pwgui ^8Åpne pit vindu (Bare admins)"
            
"%nl%^3!sc ^8Åpne sikkerhetsbil (Bare admins)";
    
main_flood "{0}^3 frakoblet for flom av chat";
    
main_on_result "Avsluttende posisjon = {0}";
    
main_lost_control "^1Fare! ^8{0} ^2er ut av kontroll!";
    
main_toslow1 "Du kjører for langsomt! Max : {0}";
    
main_toslow2 "frakoble på {0}";
    
main_toslowvery1 "Du er veldig langsom, og blir satt i tilskuermodus!";
    
main_toslowvery2 "{0} er for langsom, og ble satt i tilskuermodus!";
    
main_idle1 "^3Du er uvirksom, og vil bli satt i tilskuermodus om 10 sekunder";
    
main_idle2 "^3Du er satt i tilskuermodus for uvirksomhet";
    
main_onnewpb "Ny PB av {0}^8 ({1}): {2}";
    
main_onnewpb_rank "Vennlig rank : {0}";
    
main_onnewpb_sesslaps "Samlet antall runder = {0}";
    
main_onnewpb_servlaps "Totalt antall runder (server) = {0}";
    
main_onnewpb_avgspeed "Gjennomsnitt fart: {0}{1}";
    
main_onnewpb_rank2 "Vennlig {0} rank: ^7{1}";
    
main_onnewpbqual "Liga - Ny QT av {0}^8:{1}";
    
main_onnewpbqual_rank "Vennlig rank (alle besøkende): ^7{0}";
    
main_onnewpbqual_pos "^2Kvali. posisjon: {0}";
    
main_onnewpbqual_pool "^6Virkelig sammenslutning: {0}";
    
main_onnewpbqual_avgspeed "Gjennomsnitt fart: {0}{1}";
    
main_onnewpbqual_posqual "{0} ^2Posisjon:{1} - Sammenslutning:{2}";
    
main_accel "^8Akselererte fra 0 til {1} {2} på ^3{0}^8 sekunder!";
    
main_notpitwindow "{0} ^1You are not on pit Windows, allowed in {1}-{2}";
    
main_inpitwindows "{0} ^1Du kan gå til pit";
    
main_outpitwindows "{0} ^1Du har ikke lov til å gå til pit";
    
main_beginpit "{0}^8 gjorde et pit stopp";
    
main_pitwork "Pit begynner! arbeid:{0}";
    
main_fastdrivepitl1_1 "{0}^1 Advarsel for å kjøre for fort i pit";
    
main_fastdrivepitl1_2 "^1ADVARSEL, FRAKOBLING MULIG";
    
main_fastdrivepitl2_1 "{0}^1 Satt i tilskuermodus for å kjøre for fort i pit";
    
main_fastdrivepitl2_2 "^1FRAKOBLET OM {0} TRY";
    
main_maxfastdrivepit1 "{0}^1frakoblet for å kjøre for fort i pit";
    
main_maxfastdrivepit2 "^1DU ER FRAKOBLET";
    
main_maxreset "{0} satt i tilskuermodus for å overgå max resets lovlig";
    
main_oncarreset "Reset av {0} på runde {1}";
    
main_specwarn "^1Advarsel, tilskuermodus";
    
main_resetrest "^2Du har^3 {0} ^2resets igjen";
    
main_close "steng";
    
main_psdistance "^7Distanse: ^2{0} ^7{1}";
    
main_psfuel "^7Drivstoff brukt: ^2{0} ^7liter";
    
main_pslaps "^7Runder gjort: ^2{0}";
    
main_pswins "^7Første plass: ^2{0}";
    
main_pssecond "^7Andre plass: ^2{0}";
    
main_psthird "^7Tredje plass: ^2{0}";
    
main_psfinished "^7Løp gjort: ^2{0}";
    
main_psquals "^7Kvalifisjoner gjort: ^2{0}";
    
main_pspole "^7Staver gjort: ^2{0}";
    
built_pos "Posisjon";
    
built_grp "Grp";
    
built_car "Bil";
    
built_track "Bane";
    
built_nick "Kallenavn";
    
built_pb "Pb";
    
built_split "Split";
    
built_splits "Splits";
    
built_points "Points";
    
built_nolfspb "LFS World PB er ikke mottatt enda";
    
built_nolfspbcrit "Ingen LFS World PB for denne bilen/banen";
    
built_lapsdone "Runder gjort";
EndLang
?>


What I think has happened (and we've struck this before) is that some control characters have been embedded at the ends of some lines. I reformatted them to remove invisible chars and it seems to work now.
Krayy
S2 licensed
what I am asking is does your language code start with 'Lang "NO"' and does it end with 'EndLang'
Krayy
S2 licensed
Just to be sure...your code block looks similar to this (with more entries):


<?php 
Lang 
"EN" # Messages for Race Events
    
rev_title "^3Race Event:  ^8{0}";
    
rev_laps "^3Laps:  ^8{0}";
    
rev_pb "^3Best:  ^8{0}";
    
rev_combo "^8{1}^3 @ ^8{0}^3";
EndLang
?>


Krayy
S2 licensed
The Lang definition is missing a comment and should be:

<?php 
Lang 
"NO" #Translated by Carlos/DenonForce14
?>

and is ther a line at the end saying "EndLang"?
Krayy
S2 licensed
From my perspective, you can do pretty much all you need to be able to do with LFS in Lapper and GLScript.

DLL extensions would only really be useful in an Outsim app (as opposed to an Insm one) for sending or receiving data to or from peripherals (guages, joysticks, gamepads etc).
Krayy
S2 licensed
This highlights a small issue...

If an addon makes a call to langEngine but there iare no entries for that language, what would happen? Would it just error and terminate?

Can it default to English if a language specific definition is not found?

Also, does this means that anyone who creates an addon will need to add definitions for all languages that are supported.
Krayy
S2 licensed
Quote from Fire_optikz001 :works like a charm ty

That'll be $30 thanks...PM me for my PayPal account
Krayy
S2 licensed
Even betterer:


<?php 
...
        
openPrivButton"Cruise_HUD_Cash",2,140,20,5,12,-1,32"^7Cash: " FormatCashGetCurrentPlayerVar"Cash" ) ) ); 
...

Sub FormatCash $tmpCash )
    IF (  
ToNum($tmpCash) < )
    
THEN
        $tmpCash 
= -$tmpCash# This converts the number to a positive
        
return ( "-" strFormat"{0:C}",$tmpCash )); 
    ELSE
        return ( 
strFormat"{0:C}",$tmpCash ) ); 
    ENDIF
EndSub
?>


Last edited by Krayy, .
Krayy
S2 licensed
Th eproblem is that Lapper is hard coded to set the Globalization CultureInfo to en-US, so you are unable to use the currency formats if you do not want brackets around them. The best way would to be put an IF clause in to convert the negative to a positive and then print the negative sign:


<?php 
$tmpCash 
GetCurrentPlayerVar"Cash" );
IF (  
$tmpCash )
THEN
    $tmpCash 
$tmpCash $tmpCash $tmpCash# This converts the number to a positive
    
openPrivButton"Cruise_HUD_Cash",2,140,20,5,12,-1,32,strFormat"^7Cash: {0:C}",$tmpCash ) ); 
ELSE
    
openPrivButton"Cruise_HUD_Cash",2,140,20,5,12,-1,32,strFormat"^7Cash: {0:C}",$tmpCash ) ); 
ENDIF
?>

I had to do 3 minuses because for some odd reason, multiplying by -1 doesnt work.
Krayy
S2 licensed
I can do the New Zealand and Australian translations

main_friendpos = "C'mon mate, crack on! You're only in {0} place ya drongo!";
Krayy
S2 licensed
Console terminates
Krayy
S2 licensed
doin a !reload is randomly crashing my Lapper instances too. And I thought is was just me ;-)

No logged errors or anything either.
Krayy
S2 licensed
Features:

* Create qualification user groups using external files or configuration file
* Hotlaps or drift mode
* Store lap PBs in Grip (Hotlap) or drift mode
* Can calculate PB by an average of 1 to 10 laps
* Calculate and store points in drift mode.
* Top PBs display in LFS.
* Display charts in LFSH (Hottlaps, Drift)
* Event-specific scripts
* View driver PBs from LFS World
* View driver statistics (fuel, km, ...) from LFS World
* Export files via FTP to use or display on websites.
* Call personalized web pages and run the code returned by these pages
* Allows setting the date format for regional support.
* Management of node events (enter/exit custom track locations)
* GLScript allows function calls on Timer.
* Setting permissions on the server according to criteria of lap times by car and circuit.
* Manage lists of swear words
* Manage driver and car handicapping (Car, Car/track, Driver)
* Manage use of driving aids in LFS
* Full vote management of LFS to End Race, Restart Race, Restart Qualification
* Sort race grid relative to PB or WR
* Automatic Car/Track rotation
* Display leading or following times separating the driver from other racers
* Personalized messages on record (WR)
* List qualifying drivers on the server
* Events called on Lapper start, new driver connections, disconnections, leaving pits, split times, enter pits, etc. ...
* Define custom commands to be executed via LFS chat.
* Message flood detection
* Set the maximum number of laps allowed by a racer during a session
* Detects loss of car control (customisable)
* Detects drivers that are too slow
* Detects drivers that are parked on the track
* Displays speed or distance values depending on the unit chosen by the drivers: km / h, km or mph, mp
* Calculates acceleration time
* Configurable pit windows
* Penalty management: Speeding in pit lane. Jumping the start before the green light

Krayy
S2 licensed
Specifications:


* Runs on Windows using .NET, or on Linux with Mono
* Written in Microsoft C#.
* Source is available under GNU license.
* Multi-threaded: A single LFS Lapper instance can manage multiple LFS servers.
* Able to reload the configuration without leaving LFS.
* Connection to LFS server using UDP or TCP.
* Uses the SQLite 3 database for easy data management
* Complete scripting language (GLScript) to develop your own scripts and events
o Management of events triggered by LFS
o Event Timer for Delayed Effects
o Logic tests (IF/ELSE, CASE/SWITCH)
o Loops (WHILE, FOR, FOREACH)
o Global or local variable scope
o Able to call internal LFSLapper functions
o Call script sub-functions
o Easy to use LFS buttons. Multiple buttons on the screen. Fully configurable
o Buttons can auto-close on Timer and generate actions
o Blinking Buttons
* Easy to include other custom modules or scripts
* Automatic detection of program crashes
* Automatic restart
* Notification by e-mail on crash.
* Complete management of log files for easy debugging of your scripts.


Last edited by Krayy, .
Krayy
S2 licensed
Unset would work...thanks for that.
Krayy
S2 licensed
Quote from Gai-Luron :Heu sorry, but i don't understand what do you want to say.

You can resize an array adding new elements. Why you say you can't?

$MyVar = GetListOfPlayers( );
$MyVar[1] = "toto";
dumpVar( $MyVar );

if i am alone this work and add "toto" as new player
Gai-Luron

Locals are fine, but if $MyVar is a global array, then it cannot be resized. i.e. If a player leaves, then the array will have 1 less element and the script will abort:

12/27/2009 10:21:55 PM -> Syntax error in cfg file "./handicapper.lpr" at line #60
You can't change the dimension of an array...
Function 'dohandicapper' script aborted
Krayy
S2 licensed
I have a request that should be fairly easy to implement....

Could you please add fuinctionality to the GetListOfPlayers function to accept 1 or 2 parameters, with the second paramter being an optional array size.

When rewriting the !handicapper function I found that I had to use a globalvar to store the handicap user array, else the subfunctions would not have the same data to work from. The GetListOfPlayers function only returns an array the size of the number of players that are online, and once a GlobalVar array has been set, any further attempts to write to it cannot resize the array, hench I had to write a function to call GetListOfPlayers and iterate through it, populating the GlobalVar with NULL records until I had a 32 element array.

If I could call is like this: $HcPlayerList = GetListOfPlayers("N", 32);
then that would solve all my problems.

Thanks

the array siz
Updated for Lapper 5.918
Krayy
S2 licensed
Here is a version that has been updated for Lapper 5.918, to work with the new way that Lapper handles vars.

Just copy this text file over the old "\bin\default\includes\handicapper.lpr" file.
Krayy
S2 licensed
Quote from nl2dav :Ey! Don't generalize a complete nation just because of one posting

Sorry about that, but Goldmember WAS a funny movie
Krayy
S2 licensed
When you say you tried to use a degree symbol, how did you do it...find it in Character Map and then copy/paste into your text editor?
Krayy
S2 licensed
Quote from Fire_optikz001 :how would i do ° for my drift angle i tried it and it gives me a ? can some one help?

http://www.lfsforum.net/showthread.php?p=26896#post26896

http://msdn.microsoft.com/en-gb/goglobal/cc305145.aspx

ANSI code = 176 for a degrees symbol
Krayy
S2 licensed
You'll need to post a copy of the OnConnectClose and OnConnectCloseKick functions so that we can see whats going on when you do the dialog close.
Krayy
S2 licensed
Quote from Gai-Luron :]In Next Release

groupToArray()

I'm laughing at the irony...and writing a HOWTO on var scope
Krayy
S2 licensed
Hey Andy,

based on the PM you sent it is only the name of the array that you are indexing that is the problem (not the ListOfUsers line that is currently commented. I just want to see if commented works first before trying uncommented. This is a method to pass a stored local var to a sub - I might have to write a HOWTO on varibale scope):


<?php 
...
openPrivButton ("player_".$i."_remove",$topleft_x+6,$topleft_y+1,25,5,5,-1,80,"Remove",Remove_Registered);
...

Sub Remove_Registered$KeyFlags,$id )
    IF (
$id != "")
    
THEN
        
# NOTE: Try with the next line ocmmented out first, then uncomment if debug line is wrong
#        $ListOfUsers= getCurrentPlayerVar( "ListOfUsers");

        # use the Split command to extract the uname from the $id which should be "player_<username>_remove"
        
$uName $ListOfUsers[ToNum(split$id,"_",))];
        
privMsg("DEBUG: uName = " $uName "; id = " $id);
#        RemoveUserFromGroup( "Events_Reg" , $uName);
 #       UserGroupToFile( "Events_Reg", "./Text_Files/Events_Reg.txt" );
    
ENDIF
EndSub

?>


FGED GREDG RDFGDR GSFDG