The online racing simulator
Searching in All forums
(879 results)
Bass-Driver
S3 licensed
Check all the lines in your script that contains cmdLFS();
I guess the error occurs within the OnConnect event

Why i say that?

at LFSLapper.LFSClient.cmdlfs(unionVal val, ArrayList args) = cmdLFS() function
at LFSLapper.LFSClient.managePacket(NCN newConnection) = Event OnConnect

Also check WHEN the crash is happening. This could lead to the faulty line in your script that cause the crash
I've never seen this error or that email error before.
Last edited by Bass-Driver, . Reason : extra information
Bass-Driver
S3 licensed
Those variables do not exist below 7.0.9.0 and thats why Lapper spit out errors.
Did you change anything in LFSLapper.LPR recently?
Bass-Driver
S3 licensed
Line #14 and #15 in myInc.lpr must be the next variables

$RestAPIClientID = "";
$RestAPIClientSecret = "";

@RealistAdam You are using the incorrect version of LFSLapper.
must be version 7.0.9.0 or higher.

About the email error: read Yisc[NL]'s post above.
Bass-Driver
S3 licensed
oke guys,
My reaction was more of a joke.

And yes i know that these kind of questions/persons exists.
You can tell on how the question is being ask, how much the person has done on their side.
But still i'm trying to be helpfull, but there is a limit.

Anyway lets not go off-topic. You guys made your point.

Thank you.
Bass-Driver
S3 licensed
Can you ask less odd questions, thanks. Big grin

First the SQL databases and now this,
Omg, what did i do to you Big grin
Bass-Driver
S3 licensed
Did you do any debugging at all?

Do some proper tests please.
Create some "debug" messages to see where and what the problem is.
Bass-Driver
S3 licensed
What did you do to test the code?

-Does the event execute?
etc etc

Do that first.
Bass-Driver
S3 licensed
show me the code.
its a LFS command, so it should work.
Bass-Driver
S3 licensed
there are a few post on the LFSLapper developer forum (Search) with a few example about trackuserdistance() and GetAngle(). The rest is up to you to test and write example codes to understand the code and merge/implement it in your own script.
Bass-Driver
S3 licensed
There is nothing that need to be updated.

You do not need to post each and every error on the forum. Its a common practise to read the error and debug your code, before panicing and spamming the forum with your own created errors Did I Say That?
Bass-Driver
S3 licensed
I've added that warning, just to notify the user why joinrequest() doesnt work.

But you can prevent it by adding a check, if the player is on track or not.


IF(GetPlayerVar($userName,OnTrack) == 1)
THEN
#Player on track
ELSE
#Player NOT on Track
ENDIF

Bass-Driver
S3 licensed
Thats not a error but a warning.

You cannot respawn spectated players.
The player MUST be on track to execute the joinrequest() function.

LFSLapper literally tells you this as you can see.
Bass-Driver
S3 licensed
which error message did you get.

Warning on Command: 'joinrequest' Cannot spawn spectated players

or

Syntax error: in file ".\default\LFSLapper.lpr" at line #xxxx
Token not catched
Function 'onmso' script aborted
Bass-Driver
S3 licensed
1st: Warning on Command: 'joinrequest' Cannot spawn spectated players
2nd: i miss an IF statement.
3rd: nicknames doesn't work in privmsg() functions.
Bass-Driver
S3 licensed
@RealistAdam: Please tell us what causes LFSLapper to crash, so we can fix it in the next versions of LFSLapper.

My quick investigation to the crash:

LFSLapper seems to crash when the playername doesn't exist, and is being used in the privmsg() function.
This need to be fixed in the next version of LFSLapper.

I've added a extra check to the command if the playernames are entered correctly.
Be aware that the usernames are capital sensitive.

For example: Bass-Driver is correct and bass-driver isn't.

CASE "!pm":
IF( $argv != "" ) THEN

$idxSpace = indexOf( $argv, " ");
IF( $idxSpace != -1 ) THEN

$User = subStr( $argv,0,$idxSpace );

#Check if Player is online on the server.
$currPly = getPlayerInfo($User);
IF( $currPly != "" ) THEN
$Message = trim( subStr( $argv,$idxSpace ) );

privMsg( $User , "^1[PM] ^7". $userName . " ^0>> ^3" . $Message);
privMsg("^1[Private Message] ^7". $User . " ^0>> ^3" . $Message);
ELSE
privMsg ( "^7Player does not exist");
ENDIF
ELSE
privMsg ( "^7Incomplete command: !pm <username> <Message>" );
ENDIF
ELSE
privMsg ( "^7Incomplete command: !pm <username> <Message>" );
ENDIF
BREAK;

Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
do you see all the privmsg() messages in the chatlog?

What do you mean, you do not have permission to share this?
Is this your code or is someone else coding it?

So many questions are going on in my mind right now.
Bass-Driver
S3 licensed
according to the changelog of 7.0.6.0

Soundoption for globalmsg(); / privmsg();
NOTE: is compatible with older scripts.

0 = No Sound
1 = Message Sound
2 = SystemMessage Sound
3 = InvalidKey Sound
4 = ERROR Sound
5 = NUM Sound

-Possible options for globalmsg() :
globalmsg("BLAHBLAH");
globalmsg("BLAHBLAH",0);
-Possible options for privmsg() :
privmsg("BLAHBLAH");
privmsg("BLAHBLAH",0);
privmsg($userName,"BLAHBLAH");
privmsg($userName,"BLAHBLAH",0);

Bass-Driver
S3 licensed
If you checked and understand the code.you see its only sent to admins.
Bass-Driver
S3 licensed
Should something like this, the code has not been tested.

CASE "!a":
IF($argv != "") THEN

#Getlistofplayers
$ListOfPlayers = GetListOfPlayers();
FOREACH ($Player in $ListOfPlayers)

$User = $Player["value"];
###Send message if a user is an admin
IF( UserisAdmin($User) == 1 )THEN
privmsg($User,"-----------------------------------");
privmsg($User,$userName." send a adminmessage");
privmsg($User,$argv);
privmsg($User,"-----------------------------------");
ENDIF

ENDFOREACH
ELSE
privmsg("Message not detected, correct syntax: !a <message>");
ENDIF
BREAK;

Bass-Driver
S3 licensed
could you give any examples like pictures or videos or whatever.

"system on the TC server" is not a good example.
Bass-Driver
S3 licensed
try \/
Because forward slash '/' is also used by discord as a command. like /n for example.
Do not think this is a LFSLapper issue.
Bass-Driver
S3 licensed
Quote from Androphp :I'm really obsessed with the mysql thing. If you can add mysql to the lapper, I will actually stop using .txt files from now on.

You asked this already:
https://www.lfs.net/forum/thre ... QL-Connection-New-Version

You can store up to 2TB of data with SQLite. Implementing MySQL will be more complicated for users to use LFSLapper.

I do not see any benefits to implementing mysql into LFSLapper.
Beside that, i have no experience with databases, so thats a nogo for me. And i'm not want to do a another big project for LFSLapper. The mod thing was already something above my level as a non-programmer.

The code of LFSLapper is opensource. So you take a look at the code and see if you can implement it in a way so its easy to use for other LFSLapper users.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
yes you can connect your LFSLapper to a lfs rented server.

You need the IP and Insim port of your rented LFS Server.
And you need to whitelist your own IP (IP you get from your ISP) in the LFS Hostpanel (Access Control Tab)
Bass-Driver
S3 licensed
The code below will display each player: NickName plus UserName, into the discord embed.

$ListOfPlayersDiscordEmbed = "";
$LoP = GetListOfPlayers("U");
FOREACH ($Player IN $LoP)

$UserName = $Player["value"];
$NickName = GetPlayerVar($UserName,"NickName");

$NickUserNameString = "".StripLFSColor($NickName)."(".$UserName.")";

###Create a new line after each $NickUserNameString has been added to $ListOfPlayersDiscordEmbed
$ListOfPlayersDiscordEmbed = $ListOfPlayersDiscordEmbed."".$NickUserNameString." \n";

ENDFOREACH
$DiscordChannel = "";
$Title = "";
$Desc = "";
$Color = "0xFFFFFF";
$FieldTitle = "List Of Players:";
$FieldValue = "".$ListOfPlayersDiscordEmbed."";
$FieldInline = "True";
$Footer = "";
$ThumbnailUrl = "";
$ImageUrl = "";
SendDiscordEmbed($DiscordChannel,$Title,$Desc,$Color,$FieldTitle,$FieldValue,$FieldInline,$Footer,$ThumbnailUrl,$ImageUrl);

Bass-Driver
S3 licensed
Could you explain what you did. With a examplecode
Could be helpfull for other lapperusers
FGED GREDG RDFGDR GSFDG