Check if something is included - 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: Check if something is included (
/showthread.php?tid=658055)
Check if something is included -
Manyula - 21.08.2018
Let's say I want to create an include which offers two functions, A and B. Function B, however, requires the streamer to be included. How do I check if the streamer is included?
Re: Check if something is included -
Lokii - 21.08.2018
PHP код:
#if !defined _inc_streamer
#include <streamer>
#endif
Re: Check if something is included -
Spmn - 21.08.2018
https://github.com/samp-incognito/sa...reamer.inc#L20
So check if `_streamer_included` is defined.
Zeex compiler doesn't generate include guards by default, so relying on _inc_* symbols might not give accurate results.
Re: Check if something is included -
Manyula - 22.08.2018
So, I just put the check inside the functions that require the streamer instead of on top of the script, correct? Thank you!