The online racing simulator
Searching in All forums
(969 results)
sinanju
S3 licensed
Just searched the lfslapper.lpr file, which is unchanged from the V7.080 zip file I downloaded.

$DriftDatabase = "Databases/DriftPB"; # this is line 1348
$StoredValueDbs = "Databases/storedvalue"; # this is line 175
$GripDatabase = "Databases/GripPB"; # this is line 1392

I'm using the default, unchanged, file online too.
sinanju
S3 licensed
Doesn't work for me.

I made new directory and deleted all the database files, added the new exe, then did few runs.

https://www.lfs.net/attachment/235395

Just to make sure, I deleted this new directory, made a new one, deleted the exe (instead of copying over) and deleted database files, then put new exe in.

Same results.

As an aside, and nothing to do with this issue, but if the databases can be put in their own folder, can all the files relating to Discord be put neatly in their own folder?

No big deal but given the choice I'd rather not have over 30 files, over half of which I'll likely never use, cluttering up the /bin directory
sinanju
S3 licensed
Alright, so I've been testing offline with blank new lapper directory, with no database files.

Only done few runs in 3 different cars, but I can see that;
DriftPB.dbs & DriftPB.elp are saved in the /default directory
GripPB.dbs, GripPB.elp and storedvalue.dbs are saved in the /default/Databases directory.

Likely, when I've downloaded all these files before from online, I've copy/pasted into each directory just in case, as I've seen files in each of these directories before. Or at least used to seeing them under /default directory in V6.

So from my very limited testing, it looks like lapper isn't writing the drift files into the database directory. But it knows where they are, as it reads them ok.
sinanju
S3 licensed
Forgive me for asking and maybe being a bit harsh, but what do you expect now?
I don't understand the code and was hoping someone else did

Someone gave you a script to help you, then you start changing it and made it worse, while also not making sure you kept a clean copy or at least track of what you did.
At one time, I had a 1Tb WD Passport drive that I had lots of things saved on. I especially bought it for keeping all my digital photos going back to the ones of my kids and family I took on my 1st every digital camera. A 3 megapixel Kodak in 2005. I also saved hundreds of family photos (going back to the 1940's) I digitised, and tried cleaning up, getting rid of spots, stains and creases. I also saved every backup of every lapper online server folder I used (different folder for different tracks and layouts) going way back to 500Servers.

One day I tried to do another backup, and all I got for my troubles was scrunch scrunch scrunch noises. Not everything lost, I thought, as I'd given my sister a 400GB IDE drive with some of my same stuff on it. When I fitted that, Windows couldn't do anything with it. Couldn't repair it. Neither could anything else I tried for fixing drives. Now, especially thanks to Google Photos, I've only backups for last 5 years of photos, along with couple of last layout servers I had. I can't afford to get multiple backup drives, nor paid online storage, although I do use Dropbox and Google free options.

Now you put it out here again with the mention of some things that are probably not working like they should but that's all the info you are giving and then expecting people to help you?
For quite a few years now, I've only done 1 lap hotlap racing on my servers, and its very rare for more than 1 person to be on the server at once. Especially when I'm also on the server. Most often, if I'm on server with someone else, they're asking for advice, sets, etc, which I provide. Usually little time for recording on screen stuff (which I've only recently thought to do).

What have you tried to solve the issues that are probably there?
Using my failing memory (and it is truly failing) to try remember what was happening. But mainly, I see some stuff working so I have left it to run as currently is. I mainly see issues when 2 other drivers on server at same time, but that was actually a rarity.

Are there errors to share?
None. I haven't had a server in over a year, haven't recorded anything when I did have one, and someone was on layout.

Have you done proper debugging on the script?
No. Most of my scripts are simple. Open a button (hopefully in the right place), then close button when not required.

...I also have the feeling that people have no idea how much time and effort it takes to come up with good scripts.
But I do.

I've spent lots of time making scripts and AutoX layouts. Majority of which I give away.

I recently spent over 20 hours updating a Touge layout I made few years back and had made available here on the forum. When I had finished the update, I uploaded the finished layout.

I've recently rented a server, but as I wasn't sure if it would come preloaded with the newest version (V7) of lapper, so I tried updating everything that worked in V6 but wouldn't work in V7. Mainly my Top and Drift tables, which worked exactly as they should have in V6. I spent full working days trying to get things to work, and when they wouldn't, I asked for help. But I did put in the effort, and showed some of the code I had tried.

So when someone does donate software I can use, or helps with issues I'm having, I am grateful. And I say so. And sometimes, in some of my posts, I acknowledge it - like your pitboard.

I realise I'm the cause of your recent rant, and I do apologise.

And I do understand.

No idea how many times I've thought 'what?' when people post things with a title like "Help me".

I've long thought about opening a post on the general part of the forum with just a question mark, and some text along the line of 'Curious to see if this is smallest question that can be used as post title', then seeing how many people read it.

Anyway, in reply to your post, and in my defense, I plead guilty.
Database duplication and out of sync Issues
sinanju
S3 licensed
Just been on my server to download latest .dbs and .elp databases (I know; must get ftp working!)

Anywho.



There are database entries in the /default directory, as well as database entries in the /default/databases directory.

As you can see in my image, time and size details of these .dbs and .elp files don't match.

It seems that the Drift scores databases are more up-to-date in the /default directory, but the Times (Grip) and storedvalue are more up-to-date in the other directory.

Online, everything appears to be working fine, but which directory is lapper looking in for the drift scores, top times, etc?

Is there a reason for the duplication and this out of sync duplication?
sinanju
S3 licensed
Done!

You can find very long post, an even longer more verbose pdf, and the code I've used for normal and abnormal buttons.

https://www.lfs.net/forum/thread/95529-Buttons---Learn-how-to-use-them---Basic-to-Advanced--includes-odd-shaped-but
Buttons - Learn how to use them - Basic to Advanced -includes odd shaped buttons
sinanju
S3 licensed
This guide is for making Basic to Advanced buttons.

Some Button code has already been topics on the LFSLapper section of the LFS Forum. See –

Basic Button code
https://www.lfs.net/forum/thread/89097-Buttons---Learn-how-to-use-them---Basics-%28Long-post%29

Advanced Button Making - Escape Codes and symbol Glyphs
https://www.lfs.net/forum/thread/89157-Buttons---Learn-how-to-use-them---Advanced-%28Symbols-Glyphs%29

Documentation for making basic buttons is included within each version of LFSLapper. If you look through the code, you will also see other more complicated code for both Private and Global buttons.

Private just means only the person looking at their screen when a specifc set of circumstances occur - normall an Event - such as when you spec, etc.

Global just means that when something happens, or an Admin triggers it, everyone will see the same button.

Along with this guide, I've included the code I've used to make be image below.


Left side shows screen when blinking buttons were off, and right side when they reappeared.

This guide is a shortened version of the attached pdf, which has lot more detail. I didn't want to put it all in this post, as it comes to 7 pages.

Hopefully, if you download it, should be easy enough to read, and make sense.
=====================================================================================================
When it comes to (documented or not) button backgrounds, and text, you can have, or make;
  • As standard, transparent, light grey, or dark grey buttons
  • Combine codes to make new code to align text on coloured buttons, e.g. to make a light coloured button with text aligned to the left, combine the existing codes (16+64) to one new code 80
  • For standard buttons, you can replace numbers for the colour and justification with ISB_ code, where ISB_LIGHT - light button (in place of 16), and ISB_LIGHT|ISB_LEFT (in place of 80) to align text left on light grey button
  • Coloured buttons – Square, oblong or circular transparent buttons with oversized coloured text lines or symbols (not normal, but I’ve used this for making flags, and things, but sometimes difficult to overlay text on top)
  • As standard, 9 colours of text. One is specified as ‘no colour’, which you might assume is clear, but it’s light grey
  • Justification of text. Unless specified Left or Right, it will be centred
  • Text on more than single line. No need to try match buttons one above other, just use %nl% where you want a (new line) line break. Button will increase depth to incorporate all lines of text
  • Blinking / flashing text and button. Both text and button flash together. If you don’t want to see a flashing button, only flashing text, you can use coloured text on transparent button, overlaid onto coloured background button. Both text and button blink on/off together – per second, if no time specified.
  • Language translation [e.g. (langEngine( "%{message}%" ) );] You will need a language section, placed at end of your script
  • Timer text - openPrivButton( "countdown_button",95,137,10,8,1,10,16,"^1%cpt%"); # Countdown from 10 in seconds
  • Combined colour text and button colour without specifying either button or text colour as you would in normal button code (some of the text colours only available with this combined code) but a combined number in colour button place, and no text colour specified in the button text.
  • Combining text to make single string of text, cutting text string down in length and changing Upper to Lower case, and vice versa
  • Using text in an array
Using standard code:
In the image (where TB = Test Button), and attached example code, you will see that some of the buttons are transparent, and some are either light grey, or dark grey.

TB1, TB4 and TB7 show uncoloured (light grey) text, centred on a transparent, a light grey and a dark grey button.
TB2, TB5 and TB8 show uncoloured (light grey) text, aligned left on a transparent, a light grey and a dark grey button.
TB3, TB6 and TB9 show uncoloured (light grey) text, aligned right on a transparent, a light grey and a dark grey button.
TB10 to TB18 show all the standard text colours centred on a light grey button.
TB19, TB20 and TB21 show centred red text on transparent, light grey and dark grey buttons, but the buttons blink off and on every second.
TB22 shows standard dark grey button, but with various colours of text
TB23 shows a button that has text on 3 lines - this need %nl% withing the text section of button to show where the line breaks occur
TB24 (not shown on button, but is grey square button with red number to right of TB23 button with 3 lines) is a countdown button.
TB25 – “Greetings” button. The text on this button can be translated. You will need at least one Translation section otherwise you will get errors. This section is normally placed at bottom of any scripts.

Using Vars in place of numbers
Instead of putting a button starts at 10, you can put a var in where $BS = 10 (Button Starts at 10 out of 200).
Vars are handy when you have a set of buttons that go together. For instance, you can have a var that sets a button at 20 (eg $BD = 20( down from top, then your 1st button might have $BD as vertical placement, but your next button would have $BD+5 if your other button was 5 high.
This means that if you want to move everything, and keep everything together, you only have to change the var rather than everybutton, and risk moving them wrongly.

Non standard code
All the buttons above the circular and Dutch flag, are not documented (and probably not many will know) and are made by combing the button and text colours together where you would put button colour code, and not putting text colour in front of the text that you want to display.

Buttons 1, 9, 17, 25, 33 and 45, are all Yellow text on different coloured buttons, some of which blink. But in none of these buttons have I put the colour number for Yellow in the button text field. The number 9 is only to show me number I used to get that particular button style.
Button 9;
openPrivButton ("2ndtest_buttons9",$HFR+40,$HFD+5,$BRW,$BRHS,$TBS,$TBT,9,"9 - combined text and button colour");
The 9 in the code equates to blinking clear button with yellow text, whereas 17 would be yellow text on light grey button.

Flags
As you can see on the screen shot, there are 3 flags.

These are made from transparent buttons that have coloured symbols on them (in place of text).

The code for this flag has text of horizontal lines on 3 lines, each with it’s own colour.

What makes this work is that the size of the text on the button is 90, which is huge considering most button text is usually 4, 5 or 6 high.

Other Shapes
If you want to see more flags, I made a video that you can find on YouTube –
https://www.youtube.com/watch?v=UCm36TlU6uY

Everything on screen, excluding the car, track and LFS timer in top right corner, are buttons; Yisc[NL]’s pitboard, flags, messages, speedtrap, etc.

You will see that there is a circular button … ‘Yoda says’.

This is one that I use for my circular drift scorer. When I first made this, I actually used it with countdown numbers.

Like the flags, it’s just symbols that have been blown up to a huge size.

If you want to see more symbols used to make road traffic signs, you can watch video I made –
https://www.youtube.com/watch?v=WjsdywOmz7E

Taken all together, this whole guide may seem quite daunting, but as I’ve attached all the code for my examples, and because I’ve tried to break it down into sections, should make things slightly easier to manage. At least, that’s my hope.

Anyway, hope the guide helps, and maybe even gives you some ideas on what you can accomplish, without knowing any very complicated code.
Live Drift Scores
sinanju
S3 licensed
While ago, I was given a script by Bass-Driver after he'd been on my server, that showed, when you were spec'd, the drift scores for drivers on track.

The script sort of worked, and then I tried to make it work better, but I just made it worse. But because I didn't keep backup of original script, and just kept amending it, no idea what and where I made changes.


Blank panel

I'd have liked to show screenshot of panel with names and scores, but a lot of my old images have somehow become corrupted (Paint cannot read this file...).

The script does show names of drivers on track, and scores, but there are issues when more than 1 driver, and problems when scores reset to zero.

Unfortunately, at the time I was using it, I could never manage to record on screen action, and see where and how errors were happening.

Really needs some tame drifters to be on your server to do their stuff while watching what's happening with the panel. I don't have any tame anybody's!

Anyone get this to work better than it does?
sinanju
S3 licensed
A while ago, someone made a Cruise system for LFSLapper ("lapper").
Not sure if it still works, but it might be ok to use as a base, and to see what's needed.
To download copy of file, go to
https://www.lfs.net/forum/post/1848179#post1848179

Also read the 1st post on this subject to see details of what it does
https://www.lfs.net/forum/post/1332435#post1332435
Buttons - who knew?
sinanju
S3 licensed
I didn't!

Change attached .txt file to .lpr, put in your Includes directory, add to your addonsused.lpr file, and then when you've got lapper running, type !testline

Some will guess from reading code what this will do, but I wouldn't have known exactly.

I won't spoil it with a picture, but don't expect too much.
sinanju
S3 licensed
Thanks Yisc[NL].
Played around with your code and got it working as I wanted for my top table.
sinanju
S3 licensed
So, for a test, I've used a lot of the FOR - ENDFOR code within the script I'm using as the base for the XRT button.

Used this, as car of choice for drifting, so I've got more times for this, than other cars.

When I click the XRT button, I get ...



Sub that needs to be added to my script is attached.

I could use this code for each of the CAR buttons, just a case of copy and paste whole sub, then find and replace the car type.

Or maybe, likely harder for me, is some sort of IF function, as in something like ...

IF
car = UF1 # this line likely won't work, but not sure what I could use (NOT cname, I'm sure)
THEN
UFI = $UF1

ELSE
IF
car = XRT
THEN
XRT = $XRT

$UF1 = GetListTop( "UF1", FALSE,FALSE );
$XRT = GetListTop( "XRT", FALSE,FALSE );
etc
sinanju
S3 licensed
Me, I'm still confused!

Anyway, I'll give you my code, that tried to use the $list arguments, but failed.

Code is based on the CIF module, and this version can be run from the CASE command (I know!!) !newtops.

This is what the table looks like, but the buttons at bottom of list (except Close) don't work.

(These are the buttons I've been experimenting on)



Do I need to put an array in for each button?

Would it be better if the old top command was reinstated?
sinanju
S3 licensed
Just had a vague thought - I'm not using standard Top Table, so maybe I need to use CatchSub. I'll try remember to check that out.
sinanju
S3 licensed
I tried putting quotes round some of the arguments, but best I could get was empty list.
I've been working for a while on doing panels with buttons for Drift Points, which seem to work fine, so haven't spent much time on my Tops stuff.
I've been trying out all these top buttons on an old tops add-on script, so that might be the issue.
Anyway, likely not be able to look at this again till mid next week, but thanks for everything so far.
Drift Top 2 (Drift Top with extra panels)
sinanju
S3 licensed
Since getting new online server, I have been working on trying to get lapper to work mainly by the use of buttons (for everything!) rather than use CASE commands.

Using a mixture of the default drifttop code, stuff I learned from Bass-Driver and Yisc[NL], a lot of reverse engineering, and some stuff I made up myself, I made additional panels for the normal drifttop lapper add-on.

On one side, is a panel where you can choose drift scores for only specific cars, or even for a specified position in the list. On the other side, is a panel that shows any drift points spec'd driver may have scored driving in each of the available cars ...



I've included a button "Top Drifts" as a 'trigger' to open the 3 panels together, but if you know what you're doing, you can easily make your own. Or set up a CASE command? This button appears when you leave the track.

Each of the panels can be closed individually

Code Add-on attached. It's in .txt format, which will need to be changed to .lpr, etc. If you're a lapper user, you should know what to do. And if you're not, then mmmmm!

You'll need to disable the normal drifttop.lpr add-on, and/or change to drifttop2.lpr.

I haven't tested the panel on right (drivers own scores) over and above the scores you see. Some people are capable of getting over 10,000 points, but I've never even got close, so I don't know how the text will look if you have 5 figure score. Should be ok, as there is space; just might look a bit cramped.

Oh, and. The left panel has a button "All YOUR Drift Points". If you have the right panel open, then this button will appear to do nothing. But it's there in case you close the right panel, and want to open it up again.
sinanju
S3 licensed
OK, after trying for a number of hours, I can give you the results of my testing (on V7.080) ...

Drift Scores:
DoMyDriftTop( XRT,FALSE,FALSE ); - This works
DoMyDriftTop( 19,FALSE,FALSE ); - This works

They're the only 2 commands I need for my drift buttons so no further tests on drifts.

Top Times:
Nothing I've tried works. Best I can do, is get an empty table ...



(and yes, I do have a UF1 time in my normal top list!)

So. I have a button set up ...

<?php 
openPrivButton
"car_UF1button",58,156,8,5,2,-1,16,"^2UF1",Click_UF1 );
?>

Then a sub ...

<?php 
Sub Click_UF1
$KeyFlags,$id )
  
closeButtonRegex (GetCurrentPlayerVar("UserName"), "SinanjuTop_*"); # close TOP List
    
DoMyUserTopUF1,DESC,FALSE,);
#    Where - UF1 = Storedvalue / DESC or ASC: Sort values descending or ascending /
#    FALSE = Display toplist ('TRUE' = go to your position) / Filter: 1 = start at position 1
EndSub
?>


Result: This does open table (ie "List of: UF1") but does not populate the table with details - nor does it produce an error in the log file

<?php 
Sub Click_UF1
()
  
closeButtonRegex (GetCurrentPlayerVar("UserName"), "SinanjuTop_*"); # close TOP List
    
DoMyUserTopUF1,DESC,FALSE,) ;
EndSub
?>


Result: This does nothing, but does throw up a "Syntax error: Incorrect number of arguments at line #181 in function 'click_uf1' script aborted" error

<?php 
Sub Click_UF1
UF1,DESC,FALSE,)
 
closeButtonRegex (GetCurrentPlayerVar("UserName"), "SinanjuTop_*"); # close TOP List
    
DoMyUserTop();
EndSub
?>


Result: This does nothing, but does throw up a "Syntax error: Incorrect number of arguments at line #188 in function 'click_uf1' script aborted" error

<?php 
Sub Click_UF1
UF1,DESC,FALSE,)
  
closeButtonRegex (GetCurrentPlayerVar("UserName"), "SinanjuTop_*"); # close TOP List
    
DoMyUserTop(UF1,DESC,FALSE,1);
EndSub
?>


Result: This does nothing, but does throw up a "Syntax error: Incorrect number of arguments at line #195 in function 'click_uf1' script aborted" error

<?php 
Sub Click_UF1
$KeyFlags,$id )
  
closeButtonRegex (GetCurrentPlayerVar("UserName"), "SinanjuTop_*"); # close TOP List
    
DoMyUserTopUF1,DESC,TRUE,);
EndSub
?>


Result: This does open table (ie "List of: UF1") but does not populate the table with details - nor does it produce an error in the log file

Also tried same subs but changing DESC to ASC (decending to ascending), but same results.

Then I thought that maybe the problem might be that if the UF1 isn't top of the times, then it should be blank, so

<?php 
Sub Click_UF1
$KeyFlags,$id )
  
closeButtonRegex (GetCurrentPlayerVar("UserName"), "SinanjuTop_*"); # close TOP List
    
DoMyUserTopUF1,DESC,FALSE,"" );
EndSub
?>


Result: Empty list

Anyone advise on where I'm going wrong?
sinanju
S3 licensed
Quote from Bass-Driver :@sinanju
I created usertop.lpr and drifttop.lpr, instead of
drf() / drfnear() / top()/ topnear()

.
The code you see in those scripts ....

Thanks for that.

The code you've supplied makes more sense now, and I can try it out for my buttons.

Thanks.
sinanju
S3 licensed
Quote from Yisc[NL :I made toptable a long time ago (2015) for you, which works in V7 of Lapper and could be good starting point to create what you want: https://www.lfs.net/forum/post/1883455#post1883455

Yes, and I still use it ...



... although I changed it slightly (size and reversed car list).

I also used your code as base for doing a Drift Points table for the driver that clicks the "your Drift Points per Car type" button ...



Although I have an understanding of what arrays in lapper are doing, I don't really want to use them for something like the buttons that I'm trying to set up, although would be easy enough I suppose to copy/paste an array for every button and then change car type, etc.

But thanks for the response. Thumbs up

As you can see, I also changed your Pitboard code (a lot) as the only info I want, is what you see in the image. I had to remove a lot of code, but I sort of got it working - Last and Best sectors not always doing what I expect, but, heh ho Smile
How to get specific Top Times and specific Top Drifts in lapper from V7.046 on?
sinanju
S3 licensed
When I was using V6 lapper, I had Top Time and Drift Score tables, where you could press a button and get information depending on the button.

For instance, press 'UF1' in Laptime table, and you got only the top UF1 times.
Press '19-36' button in same table, and you got list of the top 19 to 36 times.



Press 'XRT' in the drift table, and you got only got a list of the XRT drift scores.
Press '73 - 90' button in drift table, and you got list of the top 73 to 90 times.



The code for this was very simple;

<?php 
    openPrivButton
"car_UF1button",58,20,8,5,2,-1,16,"^2UF1",Click_UF1 );
?>


<?php 
    Sub Click_UF1
$KeyFlags,$id )
    
# my code
    
End Sub
?>


"# my code", depending on use, would have been

<?php 
    top 
(UF1)    # top times for UF1 only
    
top (19_36)  # top 19 to 36 times for all cars
    
drf (XRT)    # top drift scores for XRT only
    
drf (19_36)  # top drift scores from position 19 to 36
?>

But in an early V7, top and drf, which used to be hardcoded into lapper, were removed.

Because of this, my simple code no longer works, and I'm not sure what has replaced it.

What do I use now?

For instance, looking in the DOCS folder, I see that Usertop table is now editable. // usertop.lpr
$list = getlisttopuser( $value,$flagdesc,$flagNear,$filter ); #Get List from stored database
!usertop command in LFSLapper.lpr

However, I can't see a description for what ( $value,$flagdesc,$flagNear,$filter )is,
and !usertop is
DoMyUserTop( $GetStoredValue,DESC,FALSE,$Filter);
where this equates to database value, descending value, display toplist, start position.

Is there something simple (like I had), or do I have to set up some sort of array system for each and every button?

Or would it be better if top() and drf() were reinstated?
sinanju
S3 licensed
Yes, I understand.

I had this idea that I would rather present drivers with a button than give them a list of commands that they type out themselves.

There's a lot of CASE commands within the default lfslapper.lpr file, and I thought that there could be a way for a button to call these commands through a press rather than typing.

It appears that there isn't. Which is fine, as your code allows me to make a button for at least some of these commands, using some of the standard Vars.

Since seeing your code, and using it to make buttons that trigger the response I want, I was going to just delete the CASE commands that the buttons have replaced, but as it's unlikely a lot of people who come on my server will know about these commands, I'm just going to leave them in.

I could just remove all the standard CASE commands, and my buttons, as the reality is, that drivers usually care about one of two things; where do they come in the TOP list and/or where do they come in the drift score list.

At the moment, I'm trying to work with !ver 7.080, but I've never used anything, or coded anything, since V6.014. The only people who will care, are lapper users who come on my server. Very small amount. And who cares what version of LFS I'm using? If people can get on the server (and it gives the details in the Server Master List when you go multiplayer) then that's enough.

My server will only be used for single lap hotlapping on layouts that I've designed and made, and the reality is, for that, I only want and need 5 things to work; A TOP list, a DRIFT TOP list, your great Pitboard (pared down as I only want to see times), my Drift Meter, and (for use only by myself) my distance meter, so I know how long a lap is, which I quote when I make my layouts public on this forum.

And none of these need CASE commands.
sinanju
S3 licensed
Tried your script and works fine, although I'm trying to get everything, including Case commands, working with a button, and you want me to use a Case command to get things started Tilt

Anyway, looks like the proper answer is no to actually putting the Case command inside a button. You basically have to use LFS/Lapper/Player Vars to run the commands inside a button.

This is fine, now that I know this.

But many thanks for putting in the effort for me. It is appreciated, as I had a one track mind to use the actual Case commands (!track, etc).

Basically, (especially) because of mobile phone apps, people are more used to having to press something for things to happen, rather than type things in. Probably why emojis are doing well. It's the way I've been leaning for years, and this was really the final step.

Anyway, I made a button to start process off, and I've used your code to get things going.


If anyone's interested, I've included a txt file with your and my code as it stands.

Anyone that wants to use it, should know about changing .txt to .lpr, etc.

Clicking "Button Shortcuts", will close that button, and add panel with a choice of buttons that you need to click to give you specific information.

If you forget to close these buttons, then they will self close when you go back on track.
sinanju
S3 licensed
Seems I may have picked one of the worst CASE commands as an example.

Your code does work, but I think it does so because after trialing other commands then trawling through the docs, I found that 'lapperversion' is also a lapper Var and a lapper Function.

I tried with about half a dozen CASE commands, making buttons and pressing them. Anything that wasn't a Var or a Function (ie 'lapperversion') only gave errors.

I also tried making a private button, as I thought I could put in the text I want, but I've never coded one before, so likely my code for that is well wrong. It didn't even end up as an error.

My test script and error log attached.
CASE command in a button?
sinanju
S3 licensed
If it's possible, I'd like myself and users to be able to use CASE commands by clicking on a button, rather than typing.

So instead of typing something like "!lapperversion", you just click a button that reads 'Lapper Version'.

Less chance of forgetting exclamation mark and/or mispelling.

I've tried various things, but nothing has worked, or given an error message in the logs.

Things like;

Sub Version($text)
$text = "!ver";
EndSub

Sub Version($command)
$command = "!ver";
EndSub

I haven't made changes to lapper since V6.014, and I regret to say that my memory is failing me, and I'm even struggling to understand a lot of the code I've written for add-ons.

If it can be done, any help would be appreciated.
AU1X Flatlands
sinanju
S3 licensed
Loaded a video on YouTube of me driving on another new layout I just made, called AU1X Flatlands.

https://youtu.be/MovIvG_DKnY

Top down view of track:



Lots of up and down hills, and a large section of track with various hairpins where there is quite a camber, which means that when you try to turn, you tend to understeer down to the wall. Or maybe just my driving with keyboard Shrug



Very strange sensation. In real life, your body would feel the pull of gravity, as well as the visual element of seeing everything at an angle, but in LFS, no gravity, and you feel like you're driving on the flat, and the scenery is at an angle.

FGED GREDG RDFGDR GSFDG