ALS hook problem
#1

So, i'm trying to hook OnPlayerConnect with ALS and i'm getting this error:

Код:
error 021: symbol already defined: "SSCANF_OnPlayerConnect"
How should I fix this?

Код:
public OnPlayerConnect(playerid)
{
	printf("[ALS_hook] OnPlayerConnect(%d)", playerid);
	
	#if defined on_OnPlayerConnect
		return on_OnPlayerConnect(playerid);
	#else
		return 1;
	#endif
}

#if defined _ALS_OnPlayerConnect
	#undef OnPlayerConnect
#else
	#define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect on_OnPlayerConnect
#if defined on_OnPlayerConnect
	forward on_OnPlayerConnect(playerid);
#endif
Reply
#2

Код HTML:
hook OnPlayerConnect(playerid)
{
	printf("[ALS_hook] OnPlayerConnect(%d)", playerid);
	
	#if defined on_OnPlayerConnect
		return on_OnPlayerConnect(playerid);
	#else
		return 1;
	#endif
}

#if defined _ALS_OnPlayerConnect
	#undef OnPlayerConnect
#else
	#define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect on_OnPlayerConnect
#if defined on_OnPlayerConnect
	forward on_OnPlayerConnect(playerid);
#endif
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)