SA-MP Forums Archive
Writing an include: detect other includes and use them - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Writing an include: detect other includes and use them (/showthread.php?tid=534327)



Writing an include: detect other includes and use them - dusk - 29.08.2014

Hello, I'm writing a simple include file and I come to a situation where I have 2 choices:
1. Write it using native samp functions
2. Detect other includes which may make it better(fot both: me and users)

And I thought to myself: why not both?

****** once wrote that when an include is included a "_inc_filename" symbol is defined.

With this I could code for both options: when a user is using that include and when he's not.

The question: is all of this worth it? It has flaws like what if the user included that library AFTER my own and so on.