#define directive is, well... special?
#1

Good Morning.

I'm having a few problems with the following piece of code:
pawn Code:
#define AC_MASTER

#include <a_samp>
#include <truckingworld/anticheat>
#include <truckingworld/sscanf2>
This causes the following error to appear (from sscanf):
Code:
truckingworld/sscanf2.inc(30) : fatal error 111: user error: sscanf (possibly the PAWN version) already defined.
However, commenting "#define AC_MASTER" out (while breaking my anti-cheat), fixes this issue and the script compiles fine (just will fail to run due to this script being my master anti-cheat script). Commenting the actual include out itself is also fine. Here is the include. (I'm in the process of re-writing my anticheat system, that's why that looks so bare!)

Anyone have any ideas. I fail to see how this could be in anyway related. The anti-cheat include (where there are conditional checks made against whether AC_MASTER is defined or not), has no relation to sscanf what-so-ever.

Thanks,
Ash
Reply
#2

The only includes I have in there are 'a_samp', 'truckingworld/anticheat' and 'truckingworld/sscanf'. I'm baffled by it!
Reply
#3

As Y_Less said,you've probably another copy of sscanf,are you using just ONE server folder and one pawno.exe to compile it?Check also if #include <sscanf> is not in another filterscripts.
Reply
#4

Quote:
Originally Posted by Logitech90
View Post
As Y_Less said,you've probably another copy of sscanf,are you using just ONE server folder and one pawno.exe to compile it?Check also if #include <sscanf> is not in another filterscripts.
I'm using one server folder, one copy of pawno (only ever had one installation), and it's not. You can see the only include that I'm making (remodelling). 'a_samp' doesn't have the #include directive for sscanf, either.
Reply
#5

I've removed the checks, and I get no crashes. That was very odd.

I may do soon, however I see no need for this in my development pattern as I'm the only one with access to my script - therefore I constantly know what's going on and shouldn't need to worry about what exists, what doesn't, who has access to what and whether the code compiles or not! I admit, I took about three weeks out of my life to look through YSI as a whole, and it's actually awesome! I'm actually surprised I understood any of it, but it really is awesome!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)