Posts: 410
Threads: 88
Joined: Oct 2008
Reputation:
0
How would you check if a function is already defined in the script?
Posts: 410
Threads: 88
Joined: Oct 2008
Reputation:
0
I know about that function, but would it apply for stocks?
Posts: 1,177
Threads: 27
Joined: Sep 2011
Reputation:
0
Just turn it into a public, no biggie.
Posts: 410
Threads: 88
Joined: Oct 2008
Reputation:
0
That's the thing, I can't do that.
Here's the issue:
There is a stock in the YSI library which is defined as 'bernstein' (hashing algorithm).
I need to use that function for an include I am working on, however the YSI library is very common.
If I would add the function to the include, people who use the YSI library will get an error saying that the function is already defined.
However if I don't put it in, assuming people already have that function defined people who don't use the YSI library will get an error saying the function is not defined.
I could rename it, but I believe people wouldn't want the same function to be defined twice in their gamemode assuming they would use the include.
Any suggestions?
Posts: 410
Threads: 88
Joined: Oct 2008
Reputation:
0
I have tried to use that, however it does some weird things...