Check if something is included
#1

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?
Reply
#2

PHP код:
#if !defined _inc_streamer
    #include <streamer>
#endif 
Reply
#3

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.
Reply
#4

So, I just put the check inside the functions that require the streamer instead of on top of the script, correct? Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)