BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Dll's

4 posters

Go down

Dll's Empty Dll's

Post by Ad1992 Thu Nov 15, 2012 1:09 pm

Does anyone here understand dll's?

case ATS_KEY_H: playCLICKONCE = true;
break;

I am trying to modify the OS ats dll, and add some functions to it. However when trying to add a new line of code, I get the following message.

11 cannot be used as a function...
Ad1992
Ad1992

Posts : 349
Join date : 2012-06-04

http://bvewesternregion.co.uk/

Back to top Go down

Dll's Empty Re: Dll's

Post by Dexter Thu Nov 15, 2012 3:46 pm

So you want us to help you with understanding to plugin, or with understanding to codinf of a plugin? Moreover, I am not sure os_ats.dll is opensource...

If you want to add some functions to your train, it can be done by defining a custom plugin index. However, I don't think "playclickonce" is defined within the plugin itself.
Dexter
Dexter

Posts : 2153
Join date : 2011-07-08
Age : 38
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Dll's Empty Re: Dll's

Post by Drag0nflamez Thu Nov 15, 2012 4:46 pm

Dexter wrote:
So you want us to help you with understanding to plugin, or with understanding to codinf of a plugin? Moreover, I am not sure os_ats.dll is opensource...

If you want to add some functions to your train, it can be done by defining a custom plugin index. However, I don't think "playclickonce" is defined within the plugin itself.
os_ats1.dll is opensource; the source code was available on oskari's website which is still available on the Internet Archive...

Drag0nflamez

Posts : 210
Join date : 2012-05-11
Location : The Netherlands

Back to top Go down

Dll's Empty Re: Dll's

Post by LabRatAndy Thu Nov 15, 2012 10:07 pm

I do understand dlls used as plugins.

The code snippet you've given is invalid outside of a switch statement, which are normally used with the case, default and break keywords. It isn't a function and cannot be used as one, my guess is that the compiler thinks that ATS_KEY_H (which is defined as 11) is suppose to be a function and is generating the error.

LabRatAndy

Posts : 101
Join date : 2011-08-29

Back to top Go down

Dll's Empty Re: Dll's

Post by Ad1992 Sun Nov 18, 2012 1:55 pm

The thing is at the moment, I have a slightly modified os ats dll and the only thing I understand is the ats commands in the cfg. What I said in the thread is apparently the code I need to enter to make it work. But if it isn't i'm confused....
Ad1992
Ad1992

Posts : 349
Join date : 2012-06-04

http://bvewesternregion.co.uk/

Back to top Go down

Dll's Empty Re: Dll's

Post by LabRatAndy Sun Nov 18, 2012 3:04 pm

I'm not sure what you're trying to do, configure the plugin or modify it? As the 2 things are different, the cfg file configures the plugin e.g. telling it which safety system to use etc. Whereas modifing the cpp souce files change or add behaviours to the plugin, but only after compiling with a C compiler.

LabRatAndy

Posts : 101
Join date : 2011-08-29

Back to top Go down

Dll's Empty Re: Dll's

Post by Ad1992 Sun Nov 18, 2012 3:35 pm

Modify it. I wish to add the following things, 5 whistles if possible, a traction cooling fan that starts and stops at a certain speed, with start and stop sounds, and the loop sound.

At present I am also trying to implement a vigilance lamp, which for some reason isn't appearing, and I have an alarm that isn't sounding either. Yet according to this cfg tutorial it should be!
Ad1992
Ad1992

Posts : 349
Join date : 2012-06-04

http://bvewesternregion.co.uk/

Back to top Go down

Dll's Empty Re: Dll's

Post by Drag0nflamez Sun Nov 18, 2012 5:08 pm

Ad1992 wrote:Modify it. I wish to add the following things, 5 whistles if possible, a traction cooling fan that starts and stops at a certain speed, with start and stop sounds, and the loop sound.

At present I am also trying to implement a vigilance lamp, which for some reason isn't appearing, and I have an alarm that isn't sounding either. Yet according to this cfg tutorial it should be!
And you've just revealed the awesome features your new 1992 stock will contain Very Happy

Drag0nflamez

Posts : 210
Join date : 2012-05-11
Location : The Netherlands

Back to top Go down

Dll's Empty Re: Dll's

Post by LabRatAndy Sun Nov 18, 2012 5:52 pm

I'm not sure 5 whistles is possible openBVE only permits 2 horns plus a looping horn. The rest is perfectly feasible to do, if your going to use os_ATS then I'd suggest creating a new module for it with the functionality you need.
However this would need to be designed and implemented in C, so if you've no experience of programming in C you'll need to learn the basics of this first.

And no unfortunately I wont do it for you I don't have the time.

LabRatAndy

Posts : 101
Join date : 2011-08-29

Back to top Go down

Dll's Empty Re: Dll's

Post by Drag0nflamez Sun Nov 18, 2012 6:19 pm

LabRatAndy wrote:I'm not sure 5 whistles is possible openBVE only permits 2 horns plus a looping horn. The rest is perfectly feasible to do, if your going to use os_ATS then I'd suggest creating a new module for it with the functionality you need.
However this would need to be designed and implemented in C, so if you've no experience of programming in C you'll need to learn the basics of this first.

And no unfortunately I wont do it for you I don't have the time.
And since there are plenty of safety keys available, taking a couple to add another 3 shouldn't be that hard.

Drag0nflamez

Posts : 210
Join date : 2012-05-11
Location : The Netherlands

Back to top Go down

Dll's Empty Re: Dll's

Post by Ad1992 Sun Nov 18, 2012 7:47 pm

Err no the 92 uses a different plugin, this is just something personal.

To be honest the dll for the 92 is less cluttered, not to mention easy to add new things. The OS is most definately not! It's cluttered, confusing and not accepting of new code.

Safety keys? Could I implement a sound effect to play along with a cab animation? Along the same lines of an animating whistle?
Ad1992
Ad1992

Posts : 349
Join date : 2012-06-04

http://bvewesternregion.co.uk/

Back to top Go down

Dll's Empty Re: Dll's

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum