The online racing simulator
Any updates?
Progress has been slow recently, due to me not feeling too well.
I did start work on the 'Schedule' module and the autoload-part (checking which race needs be to loaded when Lapper is started) is nearly finished.
Today I finished the work on the 'Set_Schedule' module, by adding the fields (Track,Car(s),Laps) for a standard race.
It uses the same data validation and Car GUI as when adding races to the schedule.
I already added a time (hour+minutes or minutes) field, which will enable you to set checking just the way you want, a few days ago.
Below are some screenshots to show what I mean.
Work will probably continue on Wednesday since I will be celebrating 'Leidens Ontzet' (the liberation from the Spanish invaders in 1574) tomorrow Smile
Attached images
Capture1.PNG
Capture2.PNG
Capture3.PNG
Capture4.PNG
Capture5.PNG
Capture6.PNG
Capture7.PNG
Quote from Yisc[NL] :Progress has been slow recently, due to me not feeling too well.
I did start work on the 'Schedule' module and the autoload-part (checking which race needs be to loaded when Lapper is started) is nearly finished.
Today I finished the work on the 'Set_Schedule' module, by adding the fields (Track,Car(s),Laps) for a standard race.
It uses the same data validation and Car GUI as when adding races to the schedule.
I already added a time (hour+minutes or minutes) field, which will enable you to set checking just the way you want, a few days ago.
Below are some screenshots to show what I mean.
Work will probably continue on Wednesday since I will be celebrating 'Leidens Ontzet' (the liberation from the Spanish invaders in 1574) tomorrow Smile

Wow! That really is as good as it gets!

Glad to see the progress. Excited for the final release!
The work continued today and I managed to re-write and extend the presentation section of the 'Schedule' module.
It has the extra options that can be set in the 'Set_Schedule' module and has the local time converted to the UTC time, based on the Timezone(s) and Offset entered into the General config screen of the 'Set_Schedule' module.
Final chapter will now be to convert and re-write the actual checking of the schedule on an every day or every hour basis and take into account when the event has ended (can also be set in the General config screen) to decide when the settings for next event can be loaded.
Will be some challenge, but I am looking forward to it.
Attached images
Capture1.PNG
Capture2.PNG
I proudly present my totaly re-written and hugely extended versions of my 'Schedule' and 'Set Schedule' modules as BETA versions.
This means that they are feature complete and have been tested internaly and now it's up for those who are interested, to give them a go and come up with feedback and/or bugs/issues.
Before you jump straight in, you will NEED Lapper version 7.0.4.8 (which is currently still a public testing version!) to be able to use these new scripts.
So unless you know exactly how to set up your own testing environment, I would like to suggest you stay away from these scripts, until the new Lapper is released and you are going to update your Lapper software anyway.

Public test version of Lapper 7.0.4.8 can be found here: https://www.lfs.net/forum/post/1928101#post1928101

Change the extension of the files to .lpr and add them to addonsused.lpr to be able to use it.

Changelog for Schedule compared to V1.06:

-Re-write for more efficient code
-Program is feature complete, tested as much as possible, time to gather feedback and fix reported bugs/issues

Changelog for Set Schedule compared to V1.04:

-Complete re-write of the module for more efficient code
-Added DELETE button to delete single server name
-DELETE and LOAD buttons are dynamic now (no server name, no buttons)
-Number of races are dynamic now, when an empty line is found, script ends
-All entered information is saved instantly, so no need to save whole form
-Added car select GUI
-Added Weather,Wind,Qual length,Start order,Reset allowed,Cruise allowed
-Added copy-function so that several values be set as default and then copied
-Splitted password into event and regular password
-When an empty value is entered, the current value will be deleted from the database
-Added check for minimum race requirements (date,time,track,car(s),laps)
-Added input validaton for all fields
-Trackcode and car(s) can now be entered in lower case and are then automaticly put in upper case
-Module should now be multi-user

-Removed GlobalVar $storage_name_schdl and replaced it with a Set/GetCurrentPlayerVar( "storage_name_schdl" )
-Fixed a bug on data validation for Weather/Wind/Qual, which failed when a non-numeric value was entered
-Fixed a bug that stopped the deletion of a servername
-Fixed a bug that stopped entering valid trackcodes for AS,FE,KY and SO tracks

-Added general configuration screen
-Fixed two bugs in Sub 'config_cars'
-Offered weather types are now based on the entered trackcode, data validation has been adjusted accordingly
-Closing General Configuration Screen can now also be done by clicking the CFG button again
-Added 'Cancel move race' button
-When Set Schedule is started for the first time, General Config Setting must be set first before anything else
-Program is feature complete, tested as much as possible, time to gather feedback and fix reported bugs/issues
Attached files
schedule.txt - 41.9 KB - 239 views
schedule_set.txt - 129 KB - 213 views
Awesome man! I will be the first one to fully rely on this Wink

It will be put to the test tomorrow!
Here's the next BETA for the 'Schedule' module.
With thanks to TechEdison for finding a bug in the time conversion from local time to UTC.

Changelog for Schedule V2.00.2 BETA:

-Fixed a bug in calculating the UTC time from the local time
-Added 'standard race password'

Change the extension of the files to .lpr and add them to addonsused.lpr to be able to use it.
Attached files
schedule.txt - 42.2 KB - 217 views
Here are the next BETAS for the 'Schedule' and 'Set Schedule' module.

Changelog for Schedule V2.00.3 BETA:

-Corrected some typos in comments
-Changed and clarified the GlobalMsg when announcement about and actual checking of schedule is postponed
-Added extra check to see wether event on the current day has already ended or not

Changelog for Set Schedule V2.00.6 BETA:

-Added check for entered timezone code to Sub 'config_time'
-Added check for overlapping times when scheduling more races on the same day to Sub 'config_time'

Change the extension of the files to .lpr and add them to addonsused.lpr to be able to use them.
Attached files
schedule.txt - 44.9 KB - 182 views
schedule_set.txt - 131.8 KB - 190 views
Here is the next BETA for the 'Schedule' module.

Changelog for Schedule V2.00.4 BETA:

-Fixed a bug in Sub 'ORS_OnLapperStart_Schedule' when settings should be changed 1 hour before start of event
-Fixed a bug in Sub 'Schedule_trackcheck' when settings should be changed 1 hour before start of event

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Attached files
schedule.txt - 45.2 KB - 210 views
Here is the next BETA for the 'Schedule' module.

Changelog for Schedule V2.00.5 BETA:

-Added extra check to prevent Lapper trying to register a ScheduledAction with an invalid syntax

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Attached files
schedule.txt - 45.9 KB - 191 views
Here are the next BETAS for the 'Schedule' and 'Set Schedule' module.

Changelog for Schedule V2.00.6 BETA:

-Added extra check to see if ending race is needed to change track and/or weather

Changelog for Set Schedule V2.00.7 BETA:

-Added a link to Race ID to be able to go straight into the Handicap System to set handicap settings

The Handicap System is currently being rebuild, to be able to work with the new link from the 'Set Schedule' module and to have more efficient code (which is badly needed).

Change the extension of the files to .lpr and add them to addonsused.lpr to be able to use them.
Attached files
schedule.txt - 46.4 KB - 191 views
schedule_set.txt - 131.9 KB - 207 views
Here are the next BETAS for the 'Schedule' and 'Set Schedule' module.
Make sure to be on the latest version of Lapper (7.0.4.8) when using/testing these moduls.

Changelog for Schedule V2.00.7 BETA:

-Added code to check for and if found, load handicap settings
-Moved the checking/changing of the weather into a new Sub, to be executed after 10 seconds (due to loading track)
-Made the columns for ID and More >>> a bit smaller
-Made the column for Comment a bit bigger

Changelog for Set Schedule V2.00.9 BETA:

-If handicaps are set for a Race ID, the ID will be displayed as green text, otherwise the text is in white
-Fixed a bug where the Race ID was always changed, when the date of a race was changed
-Made the columns for ID and More >>> a bit smaller
-Made the column for Comment a bit bigger and extended input size from 30 to 40 characters
-Limited Race ID to a maximum of 999, after that it will go back to 1 again
-Added a check wether handicap settings needs to be deleted (and delete them when found), when deleting a race
-Fixed a bug where the wrong Race ID was passed on to the Handicap System
-Added routine to delete all handicap settings, when deleting the whole schedule of the current server

The Handicap System is nearly finished and will probably put up here for testing tomorrow.

Change the extension of the files to .lpr and add them to addonsused.lpr to be able to use them.
Attached files
schedule.txt - 48.1 KB - 212 views
schedule_set.txt - 135.1 KB - 221 views
Wow, these modules getting better and better.
Keep up the good work.
Finally have some time to test this out.

I'm going to set it up on my race server and in 30 minutes we'll see if the event I set works correctly, and then resets after 1 hour.

(If you want to join and test, I will add you to the admins list Yisc[NL]. [VT] VTEC Race Server)
Here is the next BETA for the 'Schedule' module.

Changelog for Schedule V2.00.8 BETA:

-Fixed a bug where the track was never cleared for driving, because of no event having been found in the schedule
-Added a button to show how long it will take when schedule will be checked (only on Lapper start)
-Added a button to show how long it will take when weather setting will be checked

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Attached files
schedule.txt - 48.9 KB - 181 views
Arggg, just as I thought I had finished rewriting three huge scrips, I stumbled onto, what I at first believed was, a bug. Face -> palm
After nearly 2 hours of debugging, pulling my hair out and banging my head on my desk, the search came up empty and I was left clueless. Confused
Just when I was about to give up (for now at least) an idea came to mind about having exceeded the maximum amount of buttons (240) LFS can have on screen.
A quick count made me realise that my code wasn't bugged, but that I indeed exceeded that amount.
Pfew, stresslevels can go down now, but it will also mean I have to do some more rewriting, to get ridd of all the D(efault) and C(opy) button and implement that in another way.
Attached images
Capture.PNG
Ohhh thats sucks indeed.
Maybe Scawen will increase the maximum buttons to 512 or something.

Just a idea:
What about creating pages for the schedules.
9 schedulelines per page and a maximum of 3 pages.
Right, programming is all about finding solutions to problems you never expected to happen, like the one described in my previous message.
I worked out a proof of concept for the time-field and it's working the way I want it to work.

I removed the D(efault) buttons and created a new one at the top of the Time column.
As you can see there's no default time set, so the buttons in the schedule are now PrivTextButton, which mean they will accept user input.



As soon as I add a default time, the buttons in the schedule change to PrivButton, which mean they only accept a mouse click.
When clicked, the default value is copied into the field and stored into the database.




When you remove the default value, by clicking the default button at the top of the column and then leave the input field empty and press OK, the buttons in the schedule will become PrivTextButton again.



This is just a quick proof of concept, as I do need to make sure the data validation is working in both cases, etc. etc. but it's a step in the right direction and can be replicated to the other D(efault) / C(opy) buttons I had.
Attached images
Capture1.PNG
Capture2.PNG
Capture3.PNG
Capture4.PNG
Rewrite is in full swing (well, I've had enough for today, but you'll get the point) and is going well.
Setting a default time, regular password and weather code is fully working again, including the data validation that was behind the old code.
Still have to do the default settings (and being able to copy them) for Wind, Qual, Start, Reset and Cruise and expect to have that finished before tomorrow evening.

There is one more thing I would like to add to this module, but I am not sure it will go in the final release of this version.
I feel that I am running out of steam (I've been sick at home for exactly 7 months now) and although I am slowly recovering, all this work is starting to take its toll.
So I might save the extra feature for the next release.
Attached images
Capture1.PNG
Capture2.PNG
Capture3.PNG
Awesome! Innovative solutions to problems are always the answer.

If you're alright with my asking, how have you been sick in bed for 7 months?!? That sounds really miserable! Frown
Quote from Bass-Driver :Ohhh thats sucks indeed.
Maybe Scawen will increase the maximum buttons to 512 or something.

Right after we get the volkswagen scirocco Wink
Quote from TechEdison :If you're alright with my asking, how have you been sick in bed for 7 months?!? That sounds really miserable! Frown

Not in bed, sick at home.
I'm suffering from a burn-out and have been on sick leave since the 13th of March 2017.
As said, I am slowly recovering and if all goes well, I will start work again (2 days of 2 hours to start with) early November.
Here is the next BETA for the 'Set Schedule' module.

The 'Server name X' buttons have 3 colors and functions now:

Text in yellow = A name for that server number is set, schedule ISN'T loaded
Text in green = A name for that server number is set, schedule IS loaded
Text in white = No name for that server number is set

Text in yellow , clicked with LEFT mouse button, schedule will be loaded
Text in yellow/green , clicked with RIGHT mouse button, name for that server number will be deleted
Text in white , clicked with the LEFT mouse button, name for that server number will be copied from the current server you're on (if that name isn't already used in one of the other server number names

Changelog for Set Schedule V2.00.10 BETA:

-Rewritten all code for setting default values and option to copy them (to avoid going over 240 buttons limit)
-Fixed a bug where weather code wasn't appearing when trackcode wasn't set, but no warning about it was given
-Removed LOAD/DELETE buttons for servers and included those functions within the 'Server name X' buttons
-Removed C(opy) button for servers and included that function within the 'Server name X' buttons

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Attached images
Capture1.PNG
Capture2.PNG
Attached files
schedule_set.txt - 132.3 KB - 181 views
Here is the next BETA for the 'Set Schedule' module.

Unless any bugs will come up, this is the final BETA.
The script went from 2566 lines of code (version 1.04) to 2909 lines of code in this BETA.
A lot of the old code has massively been improved, while a lot of features has been added.

The Schedule script went from 1924 lines of code (version 1.06) to 1287 lines of code in the latest BETA (V2.00.7 BETA).
Again a lot of old code has been massively improved.

Changelog for Set Schedule V2.00.11 BETA:

-Fixed a bug where the Default buttons weren't closed when opening General Configuration screen

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Attached files
schedule_set.txt - 132.8 KB - 168 views
Here are the next BETAS for the 'Schedule' and 'Set Schedule' module.

Changelog for Schedule V2.00.11 BETA:

-Current qualify length is now checked and only changed if needed (needs LFS Lapper 7.0.4.9)
-Current canreset status is now checked and only changed if needed (needs LFS Lapper 7.0.4.9)
-Current cruise status is now checked and only changed if needed (needs LFS Lapper 7.0.4.9)
-Added two Globalvars to be used to write data to a file
-Added a Goto to Sub 'OnNewPlayerJoin_Schedule'
-Added a new Sub 'Update_password' to be able to save data to a file when a player joins the track
-Added an extra delay after ending a race (/end) (which takes at least 3 seconds), before changing track
-Clear the values of GlobalVars $date_storage and $pwd_storage in Sub 'Update_password' after sending data through HTTP

Changelog for Set Schedule V2.00.12 BETA:

-Fixed a bug in Sub 'config_schedule_interval' where $track_check_minutes were calculated wrongly when using H:M

Change the extension of the files to .lpr and add them to addonsused.lpr to be able to use them.
Attached files
schedule.txt - 52.9 KB - 169 views
schedule_set.txt - 133.1 KB - 169 views

FGED GREDG RDFGDR GSFDG