Although I've been using and doing things in 'lapper' now for a couple of years, everything I've done is basically opening and closing buttons.
This has been fine for my needs, and has basically proved that you don't need to be a programmer of any sort of computer language to be able to change the look and feel of the interaction between an InSim like LFSLapper and LFS - although if you are a programmer then you've not only got a good head start, but you can simplify and condense things enormously - just look at my original Winnerflags.lpr to Gai's proper programmer version!
Anyway. Although I've used sub-routines to perform specific tasks, I've always had to play around with what would or wouldn't work within the brackets on the Sub header line.
I don't even know what the term is for that part of the sub procedure.
I'm now working on adding a drag race system to the layout that's currently on my server (just for fun and not the main reason for the layout), but am having problems with errors being thrown up regarding the sub-routine header lines.
Errors such as;
For instance, I get that message if I do something like
I've seen all the following in use;
()
as in Sub MyTest()
( $userName )
as in Sub DisplaySpeed( $userName )
( $KeyFlags )
as in Sub Config_Pitboard( $KeyFlags )
( $KeyFlags,$id )
as in Sub OnConnectClose( $KeyFlags,$id )
- within a CASE command, this would likely be shown as OnConnectClose( 0.0)
I've also seen others used, such as;
( $id, $argv )
($userName,$argv)
($KeyFlags,$userName)
Can anyone explain what they are, how to use them, what's a $KeyFlag, an $id, etc?
Also, what to use, how, etc., when they are called from within another sub-routine or an Event?
This has been fine for my needs, and has basically proved that you don't need to be a programmer of any sort of computer language to be able to change the look and feel of the interaction between an InSim like LFSLapper and LFS - although if you are a programmer then you've not only got a good head start, but you can simplify and condense things enormously - just look at my original Winnerflags.lpr to Gai's proper programmer version!
Anyway. Although I've used sub-routines to perform specific tasks, I've always had to play around with what would or wouldn't work within the brackets on the Sub header line.
I don't even know what the term is for that part of the sub procedure.
I'm now working on adding a drag race system to the layout that's currently on my server (just for fun and not the main reason for the layout), but am having problems with errors being thrown up regarding the sub-routine header lines.
Errors such as;
For instance, I get that message if I do something like
CASE "!drag":
SE_DragRace(0,0)and then start the sub-routine
Sub SE_DragRace($KeyFlags,$id)or if I do
CASE "!drag":
SE_DragRace()and then start the sub-routine
Sub SE_DragRace($userName)Thinking about it, I realise that I have no idea what the brackets (to tell/warn lapper that it's the end of the header line of an event or sub-routine?), or even what the text in brackets (even if empty) are for.
I've seen all the following in use;
()
as in Sub MyTest()
( $userName )
as in Sub DisplaySpeed( $userName )
( $KeyFlags )
as in Sub Config_Pitboard( $KeyFlags )
( $KeyFlags,$id )
as in Sub OnConnectClose( $KeyFlags,$id )
- within a CASE command, this would likely be shown as OnConnectClose( 0.0)
I've also seen others used, such as;
( $id, $argv )
($userName,$argv)
($KeyFlags,$userName)
Can anyone explain what they are, how to use them, what's a $KeyFlag, an $id, etc?
Also, what to use, how, etc., when they are called from within another sub-routine or an Event?