The online racing simulator
[Solved] RegisterScheduleAction
Hi Guys, I can't find much information about this in docs...

RegisterScheduleAction("Test"," * * * * * * * ",Test)
RegisterScheduleAction("Test"," 1 2 3 4 5 6 7 ",Test)

1 - Seconds
2 - Minutes
3 - Hours
4 - Day Of Week (Not Sure what Number relates to each Day)
5 - Day
6 - Month
7 - Not Sure Guessing Year

Can I ask why Seconds Minutes Hours is that way round as makes them much harder to read and use when you use a lot of them as date is dead easy WEEKDAY - DAY - MONTH - YEAR(I Think)

Andy
There is some info about RegisterScheduledAction() in the changelog. But nothing about the parameters.

I opened LFSLapper.LPR and i found this.


RegisterScheduleAction( "0 0 0 * * * *", SA_mid );

You can register a subfunction to call when a time is reached

Firts arg = cron format ss mm hh dayOfWeek dd MM YYYY

dayOfWeek start at 0 = Sunday

Second arg = Sub to call when player type this text

Hi Dan, Thanks for reply I will download Lapper again so I have a default LFSLapper.lpr as mine are ripped to bits lol. Any chance of moving the ss mm hh around to hh mm ss to make them easier to use?

Andy
The function will become uncompatible with older Lapper versions.
Hi Dan I understand that but that means Lapper will be held back if you have to maintain backward compatibility imo

Andy
You are right about the compatibiltycode. I have done that with many functions, but i'm not in the mood to rewrite the RegisterScheduleAction() code again to make it compatible.

It took me a while to solve an old RegisterScheduleAction() bug. So Ill leave it as it is.
OK

Andy
This thread is closed

[Solved] RegisterScheduleAction
(7 posts, closed, started )
FGED GREDG RDFGDR GSFDG