The online racing simulator
Searching in All forums
(951 results)
Yisc[NL]
S3 licensed
Valve?
That's a completely diffent company that has not got anything to do with LFS.
The LFS server can be reset by the owner (or people that got the right to do so) using the "Hosting" tab on this forum.
Yisc[NL]
S3 licensed
Quote from RealistAdam :It is very easy to change the MAC address and SSD-HDD serial. In Windows, you can do this with programs. You can even change your MAC address by contacting your internet provider. this is possible. If you are considering a ban method, it should be motherboard ban.

You clearly have no idea what a MAC address is.
That's a unique number that cannot be changed in any way.
You are confusing it with an IP address, which can be changed or spoofed.
Yisc[NL]
S3 licensed
I get it, the webpage should send a variable to Lapper, but I am not sure if that's possible.
You could try to add this to your PHP-script:

echo "0";

Or 1 if that is the outcome of the check.
But again, I am not sure if it's possible to start with.
If I am in de mood this weekend, I will give it a try and come back on it (no promises though).
Yisc[NL]
S3 licensed
Have a look at this message: https://www.lfs.net/forum/thread/93714
Yisc[NL]
S3 licensed
Quote from Bass-Driver :this post is really unnecessary(You can delete this post if needed), but want to show an example how i debug my code.
Last week some random errors occur on my timeattack script, when it tries to save the local saved stagetimes to the textfiles. The Timeattack server is down due to this bug. Testing during development went fine BTW

In case this isn't fixed, I would start to dump every action into a logfile.
The error is clear as it states that at some point the textfile that you want to edit, is empty.
Now you need to find why it is empty and at what point it is or becomes empty.
Maybe the name (that is made from variables) gets funky and when it then tries to open it, the code 'think' it is empty because it cannot find that particular file.
Things like this causes huge headaches, but once you figured it out and was able to fix it, you will get a boost.
Yisc[NL]
S3 licensed
If code doesn't work, but there is no error either, it means the code is written and handled correctly. But if for instance a comparison is written wrongly causing it to never be true, nothing will happen, while the actual code is correctly written and handled.
That's why the capability of being able to debug it properly, is so important and that can go as far as micro details by putting a debug message (with a number to know which one you are seeing (or not)) after every line.
This will tell you what step the code has gone through.
Yisc[NL]
S3 licensed
I am always willing to help people (search this forum and you will see that's true) but what I don't like is people coming in here, asking questions all the time and not showing what they did to troubleshoot there issue.

Same with this.
You post a piece of code that Bass-Driver has given you and claim it doesn't work.
Okay, there is no error, but errors only come if the code is faulty and/or when Lapper runs into an issue that isn't properly handled by it.
Since there are no errors, we can rule both of those out.
Next step would be to put in some debug-code in the IF-statement to see what is or isn't executed.
Once you know where in the IF-loop you are (or maybe the outcome is that the IF-loop is never entered, so then you have to see what the last step was before that loop), you can start checking the next step.

Debugging can always be done by adding a Privmsg within the loop or by writing something to the Lapper console.

Maybe you did all of this, but you haven't shared any of it and have not told us the outcome of the debugging.
Yisc[NL]
S3 licensed
There always is a response, wether it's an error because of faulty code or the IF-statement being excuted.
What have you tried to debug the issue and what was the outcome of that?
I think Bass-Driver was very clear a few posts ago, to not post every issue you have, without making any efforts your self.
This is not a Lapper Helpdesk you can 'call' for all your needs.
Yisc[NL]
S3 licensed
Quote from rane_nbg :Or adding physics to a moving subobjects, enabling us to create working machines, like planes, caterpilar/crane wehicles.

This nonsense has gone way too far already in my opinion.
LFS is a racing simulator.
What's next?
Being able to use the cranes to build houses, factories, racing circuits or to fly planes in and out the racing track?
There should be one focus and one focus only from now on and that's new tyre physics and the graphics update.
Yisc[NL]
S3 licensed
The error causing the crash is in the 4rd line (6th if you count the empty ones as well): The specified string is not in the form required for an e-mail address.

Somewhere an emailadress is put into Lapper and not in the correct format.
Yisc[NL]
S3 licensed
Ah, well thought of and even a better solution than mine.
Yisc[NL]
S3 licensed
As I think that you already have created a loop to go through the content of the file, you should add SplitToArray to that loop.
The value to make the split on will be "=" which will then give you an array for each line, with the following content in the array for each line read:

position 0 of the array: name of the value
position 1 of the arry: value

Example:

position 0 of the array: ban
position 1 of the arry: 0
Yisc[NL]
S3 licensed
Maybe I am a bit cranky today, but what do you expect?

You came here with a question about something you have seen on a server.
You have not made any effort your self.
You got help from two people that know what they are doing when it comes to Lapper scripts.

First example you try and does not work as you want.
Second example does certainly work, but you want it differently.
Then you make no effort again, but expect help from us/others.

This is not the way to learn things.
Have a go at the code, debug it properly and if you really get stuck, show what you have, what the error is, etc.
Yisc[NL]
S3 licensed
Well, you can use my code and strip the GUI out of it.
Shouldn't be too hard to accomplish.
Yisc[NL]
S3 licensed
I wrote and admin chat back in the day.
Cannot remember if I ever shared it, but here it is.
Rename the file to *.lpr and make sure to add it to addonsused.lpr

The message that have been written are into a file called "Adminchat.txt" in the current, code but both the location and the name of the file can be changed of course.
To keep track of the messageID, that value is stored in the Lapper database.
The chat can be started using "!adminchat" or "!adchat"
I'm supplying the code as is, so don't ask for changes, new features, etc.
Yisc[NL]
S3 licensed
Quote from Bass-Driver :Could you explain what you did. With a examplecode
Could be helpfull for other lapperusers

He fixed the image size, not the actual problem he asked help for (if I am understanding things correctly).
Yisc[NL]
S3 licensed
Im am not into mods at all, but maybe updates need to be approved before being visible?
Yisc[NL]
S3 licensed
Quote from Bass-Driver :I havent see anyone using LFSLapper locally, so do not know if it actually works.

When the AB.nl server were running on a LFS server, I hosted Lapper from my home.
Made it connect to the correct IP address and portnumber and whitelisted my home IP address in the LFS server settings.
Worked flawless.
Yisc[NL]
S3 licensed
Quote from ronhill_lights :Ok but i downloaded the file and i eneter it in my Lfs editor map,but Microsoft Defender says that this app is unknown and it may be dangerous to my computer

That's what they call "a false positive" so can be ignored.
Yisc[NL]
S3 licensed
I don't think there is anything you can do to solve that. Many programs have scheduled checks to see if there's an update, to run a security scan, etc. etc.
Make sure to restart your computer every day, so that checks/updates/scans are done as often as possible and if things are slow, then check taskmanager to see if anything special comes up.
Yisc[NL]
S3 licensed
My educated guess is that one or more processes in the background are consuming CPU time and therefor the low end machine runs below its normal capacity. Windows updates can be cause, which are distributed by Microsoft once a month (2nd Tuesday) but updates and/or checks for other updates can cause this as well.
Yisc[NL]
S3 licensed
Lapper should keep updating the information stored in the CSV file.
Then the website will show the latest data when loading or refreshing the page.
A refresh can be done automatically using a header, but don't know if Wordpress allows or can use that, as I build my websites without such tools).
Yisc[NL]
S3 licensed
If Lapper keeps updating the CSV file and that file is on the actual webserver, it will always be up-to-date.
Yisc[NL]
S3 licensed
Quote from neron59 :I may have done something wrong but it doesn't work.
I'll try again tomorrow Smile

Probably, as I know for sure (100%) that it works. Smile
Yisc[NL]
S3 licensed
Right, I had to get up to speed again, but it's done.
Here's all the code you need.

First the CASE:


CASE "!5":
Globalvar $Seconds;
Globalvar $DisplaySeconds;
Globalvar $Minutes;
Globalvar $start_race_seconds;

$Seconds = 0;
$DisplaySeconds = 0;
$Minutes = 0;
$start_race_seconds = 300;

calc_race_start_time( 0,0 );
BREAK;

Then the sub-event to calculate the time:


Sub calc_race_start_time( $KeyFlags,$id )
$Minutes = round(($start_race_seconds/60),0);
$Time = (round(($start_race_seconds/60),2)-$Minutes);
$Seconds = round(($Time*60),0);

IF ( $Seconds < 0 )
THEN # when seconds are negative
$Minutes = $Minutes-1;
$Seconds = 60 + $Seconds;
ENDIF

$DisplaySeconds=$Seconds;

Timer( $KeyFlags );#Goto Countdowntimer
EndSub

Then the actual button to display the time:


Sub Timer( $KeyFlags )
### Display button ###
openGlobalButton( "countdown_button",78,60,82,20,13,-1,16,"^3Race starts in " . $Minutes . " minutes and " . $DisplaySeconds . " seconds" );
### End ###

### Reduce seconds by 1 ###
### If seconds are below 0, reduce minutes by 1 and set seconds back to 59 ###
### If seconds are below 10, add a leading 0 to the displayed value ####
$Seconds = $Seconds-1;

IF ( $Seconds < 0 )
THEN
$Minutes = $Minutes-1;
$Seconds = 59;
ENDIF

IF ( $Seconds < 10 )
THEN
$DisplaySeconds="0".$Seconds;
ELSE
$DisplaySeconds=$Seconds;
ENDIF
### End ###

### If minutes and seconds are greater then or equal to 0, use the 1 second loop, else close button ###
IF ( $Minutes >= 0 && $Seconds >=0 )
THEN
HostDelayedCommand( 1, Timer );
ELSE
closeGlobalButton( "countdown_button" );
ENDIF
### End ###
EndSub

FGED GREDG RDFGDR GSFDG