Optional dependency
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
Optional dependency
Hi
I forget how to make a dependency optional instead of mandatory. Can someone help please
I forget how to make a dependency optional instead of mandatory. Can someone help please
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
- Atreides
- Posts: 1090
- Joined: March 30th, 2019, 10:38 pm
- Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off
Re: Optional dependency
They're always optional.
- hermestrismi
- Posts: 634
- Joined: February 6th, 2016, 11:28 pm
- Location: Tunisia
- Contact:
Re: Optional dependency
This was what I thought until the error "you don't have the file name" came
So, I need just to add IFHAVE (depencency name) to grap a file from them or add a variable to the Dependency and then
Check if that variable exist
The Dark Master, The Dark Hordes (Unofficial version), Return of the Legion , Eternal Kingdom, An Elvish Scout,Unrest in Elfland , Hidden War ...
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
The Dark Master Project, Arabic tra. maintainer
"But he loves you" G. Carlin
- Atreides
- Posts: 1090
- Joined: March 30th, 2019, 10:38 pm
- Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off
Re: Optional dependency
Yeah "optional" but not since they can with great ease break if missing. I believe the onus is on the programmer of the addons to build in safeties if they want. In fact I did just that come to think of it. I put a long list of dependencies and the addon that recommends them checks to see if in fact they exist or not.
I don't know though what would happen if one installed EoMa without its resources depency. Maybe it has a check, I've not looked. But without all those graphics it would might work but generate a ton of errors on stderr!
I don't know though what would happen if one installed EoMa without its resources depency. Maybe it has a check, I've not looked. But without all those graphics it would might work but generate a ton of errors on stderr!