The online racing simulator
Searching in All forums
(882 results)
Bass-Driver
S3 licensed
Probably you have a another LFSLapper running on the background or other insim application that is using the same Remoteport, in this case remoteport 3002.

You can simply change that by opening LFSServers.cfg in the Bin folder and change the remoteport other than 3002, for example 3003 or 4003 or whatever you like.
Do not forget to enter the ip and insimport of the lfsserver.

To establish the connection between LFSLapper and the server. You must whitelist your IP (the IP you receive from your ISP) in the hostpanel on lfs.net (Access control tab > Allow IP addresses to the InSim port)
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
New insim version is live.

This version supports all available mods of LFS. (Be aware: Layout may not suitable for the vehicle you are driving).
This update gave me few headaches. LFSLapper and Arrays and numeric values.
Most of the changes are internally, but there are a few visual changes to the TopHUD and timetable !times.

V3.0.0(06-01-2024)

Global:
Add: System find the Best Sectortimes of each Car/Stage combo instead of the 1st place sectortimes.

Changed: Support all mods, instead of 120 mods. (Be Aware: Layout may not be suitable for all mods)
Changed: Folder/file structure changed. This reduce the time saving the stagetimes.
-Instead of have 6 stagetime files. each car/stage combo has its own file.
Changed: [HUD] Added Name of loaded TimeTable
Changed: [HUD] Added Name of current track configuration
Changed: [HUD] Added current stagenumner you are currently driving on
Changed: [HUD] Loadingbar percentage when loading the timetable. (Only by admins)
Changed: [HUD] Final Stagetime with penalty now shown when finishing the stage.
Changed: Alot of code cleanup.
Changed: Minor text changes.

Fixed: [HUD] Random sector colors
Fixed: [HUD] Minor character/color errors.
Fixed: Few admincommands could be executed by non-admins.

Removed: [HUD] Vehicle Damage system.
Removed: [Admin] ModList menu.

TimeTable:
Add: Sector times columns with the fastest times.
Add: TimeGap Column
Add: Best Sectortimes will be visible in purple color.
Add: Sutton with amount of records per stage and total.
Add: Name of TimeTable and track configuration.
Add: Click on the name of the player for the Gap between the Player and the other players in the list. Click again to disable it.

Disabled: More Information button (Splitspeeds, Date etc)
Disabled: List of cars

HelpMenu:
Changed: Removed a few adminscommands
Changed: Removed !reqmod command
Changed: Removed !fix command to reset vehicle damage (not actual damage)
Changed: Number of stages and name now shown in 'ServerInfo' Tab

Bass-Driver
S3 licensed
Are you sure you did it correctly?
Because when i register my application it shows me the 2 codes.



And in MyInc.LPR

#####LFS REST API##### register your LFSLapper @ https://www.lfs.net/account/api/register
$RestAPIClientID = "";
$RestAPIClientSecret = "";
Bass-Driver
S3 licensed
its written in the changelog of V7.0.9.0

-Register your LFSLapper @ https://www.lfs.net/account/api
-Fill in your ClientID and ClientSecret in myInc.LPR (includes/myinc.lpr)
Bass-Driver
S3 licensed
-What is the version of LFSlapper you are using.
-Do you fill in the ClientID and ClientSecret.
-Did you change other pieces of code in your scripts.
-Did you try getmodinfo("172CB8"); for example
-What are the other errormessages you got.
Bass-Driver
S3 licensed
try something else

CASE "!hh":
$modinformation = getmodinfo("arda556");
privmsg("Name of mod:".$modinformation["name"]."");
BREAK;

Bass-Driver
S3 licensed
do you use $modinfo for something else.

This should work.

$modinfo is an array of variables and values that will be received from getmodinfo("arda556");

You could try to enter a modname instead of playername.
Although the player must be on track with a modded vehicle.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
"Var not defined on file" means variable does not exist.
Bass-Driver
S3 licensed
can you post the code please
Bass-Driver
S3 licensed
well it error says: the function does not exist().
That simply means LFSLapper doesnt reconize the function.

According to the changelog of V7.0.9.0 it should be getmodinfo("");

4: [LapperFunction] getmodinfo(""); Get modinfo
-2 differend ways to request modinfo , by username( player must be on track!!!) or by SkinID (getcurrentplayervar("Car"))

$modinfo = getmodinfo("Bass-Driver");
or
$modinfo = getmodinfo("E25059");

#example: privmsg("Name of mod:".$modinfo["name"]."");

list of variables:
status,id,name,descriptionshort,description,userid,username,wip
publishedat,numdownloads,currusage,rating,numratings,staffpick
tweakmod,version,lastdownloadedat,class,ev
icecc,icenumcylinders,icelayout,evredLine,drive,shifttype
power,maxpowerrpm,mass,bhp,powerweightratio,bhpton,fueltanksize

EDIT: I think you have found a testscript from the early versions of the RestAPI implementation.
Always check the changelog for the correct syntax of these Lapper functions/events.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
I found a mistake in the code.
You cannot spectate the NickName of the player.

cmdLFS ( "/spec " . GetCurrentPlayerVar("Nickname") );

NickName should be UserName
Bass-Driver
S3 licensed
CASE "!drag":
$userName = GetCurrentPlayerVar( "UserName" );

IF(GetPlayervar($userName,"OnTrack") == 1) THEN #Check is the player is on track.

$X_Axis = "120.65"; #X axis SpawnPoint
$Y_Axis = "479.31"; #Y axis SpawnPoint
$Z_Axis = "31"; #Z axis SpawnPoint
$Flags = 128; #Move/Reset car (128) else (0)
$Heading = 0; #Heading of the players car at Spawnpoint
$UCID = GetCurrentPlayerVar("UCID"); #Connection unique id
$PLID = GetCurrentPlayerVar("PLID"); #Player's unique id
$JRRAction = 4;

joinrequest($X_Axis , $Y_Axis , $Z_Axis , $Flags ,$Heading , $UCID , $PLID ,$JRRAction);

$Message = " ```fix\n (". GetCurrentPlayerVar("UserName").") drag bölgesine ışınlandı. >> (". GetLapperVar ( "LongTime" ) .") ``` "; $DiscordChannel = "1174408635892387952"; sendmessagetodiscord($DiscordChannel,$Message);
globalMsg( GetCurrentPlayerVar("NickName") . " ^6Drag başlangıcı yerine ışınlandı, ^6!drag yazarak sende ışınlan.");

ELSE
privmsg($userName,"You cannot use this command!");
ENDIF
BREAK;

Bass-Driver
S3 licensed
My apologies, if i sounded a bit too harsh.
Bass-Driver
S3 licensed
Sorry for interrupting but:

12/4/2023 11:05:22 PM -> Syntax error: in file ".\default\LFSLapper.lpr" at line #1573
Warning on Command: 'joinrequest' Cannot spawn spectated players

The joinrequest() doesnt work when a player is spectating.


@RealistAdam: please read the error/warnings, because the description of the error/warning gives an idea to fix it.

you can prevent this by ignore the code when someone is spectating or in pit.

IF(GetPlayervar($userName,"OnTrack") == 1) THEN
#code when a player is on Track.
ELSE
#code when a player is spectating or in pit.
ENDIF

Bass-Driver
S3 licensed
as i said in a few posts above
privMsgw(); must be privMsg();

You could figure this out, because the line:
privMsgw( GetCurrentPlayerVar("NickName") . " ^6IŞINLANDI, ^6admin özel alanda."); isnt displaying any text in the chat.


Almost all errormessages gives you the reason why a piece of code isnt working. 90% of the time its caused by a typo.

Test your code in a private server, before publishing it on a public server.
Bass-Driver
S3 licensed
I guess you have an 'ELSE' too many.
Bass-Driver
S3 licensed
I just joined your server. And typed !drag (this is the location that you showed me) Its just working fine.
But i feel that the insim is slow on response sometimes. Maybe this could cause the weird crashes?

12/4/2023 11:01:45 PM -> Syntax error: in file ".\default\LFSLapper.lpr" at line #1486
The function: privMsgw does not exist

This is a typo on your end.
privMsgw() must be privMsg()
Bass-Driver
S3 licensed
That error means that one of the values of the parameters is incorrect. Not sure if that's causing the InsimLimit error.
Check the values, and if you could get it working. Tell me which parameter is causing the crash.

You get the same errormessage as in the post below.
But somehow i couldn't reproduce the crash.

https://www.lfs.net/forum/thread/104538

Please provide me the following details.
  • Values of the parameters that will be send by JoinRequest();
  • Name of the Track
  • Name of the car
  • Picture of the spawnlocation.
Bass-Driver
S3 licensed
Check the link below. You probably send too many buttons/messages at once. Check your scripts.

https://www.lfs.net/forum/post/1889715#post1889715
Bass-Driver
S3 licensed
Deleting messages from a channel will a pain.
  • First you need to ask your Discordbot to create a list of MessageID's you want to delete.

  • Second: send a command to your discordbot to delete the list of messageID's.
This requires 2 functions to delete a message. This is kinda confusing and time consuming. Because you need to check the discordchannel beforehand to get/copy all the messageID's.

I've been looking to update a message (created by a bot), so you do not need to create a new message anymore.
But, need to dive deeper into the code to proper implement this feature into Lapper. Not sure when that will be.

Maybe its handy to create a command that users can execute, to display the playercount in the server. Instead of spamming the channel.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Its not possible to send a Discord PM's by LFSLapper.

You can mention a user (V7.0.9.4), but that requires their Discord UserID.

EDIT: Also sending a PM requires their UserID.

EDIT2: Looking at the code, i think its not to hard to implement this feature in LFSLapper.
https://stackoverflow.com/ques ... ssagepm-to-specified-user
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
This is soo odd. It didn't saved the changes, i made in visual studio.
but it took the changes when i compiled it.

Download the file again.
Bass-Driver
S3 licensed
LFSLapper is opensource.
Download lapper and open the src folder.

Open the projectfile in visual studio and you can edit the code.

For the last .exe, i've attached the file that has been edited.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Increasing the demo playerlimit doesnt help either, because of the lack of content the Demonstration version is having. But thats what a demo version is. So you might get bored quickly, no matter what the playerlimit is.

Its better to save some money. And buy S3. Or help each other.

Also LFS might require higher specs with the new Graphical update. So if you have trouble with running LFS atm, it will be worse with the new graphical update.
Bass-Driver
S3 licensed
try now, uploaded a new .exe
FGED GREDG RDFGDR GSFDG