SA-MP Forums Archive
Streamer - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Streamer (/showthread.php?tid=260955)



Streamer - Adam_Dixon - 11.06.2011

C:\Documents and Settings\Administrator\My Documents\riad\RuNix\pawno\include\streamer.inc(21 3) : error 021: symbol already defined: "OnFilterScriptInit"
C:\Documents and Settings\Administrator\My Documents\riad\RuNix\pawno\include\streamer.inc(27 3) : error 021: symbol already defined: "OnPlayerConnect"

What is the problem?


Re: Streamer - 0ne - 11.06.2011

you used those callbacks more than one time


Re: Streamer - Adam_Dixon - 11.06.2011

Its in the streamer.inc


Re: Streamer - Riddy - 11.06.2011

[bump] same problem


Re: Streamer - Riddy - 12.06.2011

nbjhjhk


Re: Streamer - Stigg - 12.06.2011

Quote:
Originally Posted by Adam_Dixon
Посмотреть сообщение
C:\Documents and Settings\Administrator\My Documents\riad\RuNix\pawno\include\streamer.inc(21 3) : error 021: symbol already defined: "OnFilterScriptInit"
C:\Documents and Settings\Administrator\My Documents\riad\RuNix\pawno\include\streamer.inc(27 3) : error 021: symbol already defined: "OnPlayerConnect"

What is the problem?
You have used callbacks:
pawn Код:
public OnFilterScriptInit()
and:
pawn Код:
public OnPlayerConnect(playerid)
Twice in your script.


Re: Streamer - Riddy - 12.06.2011

This is in the streamer.inc


Re: Streamer - Riddy - 12.06.2011

Код:
public OnPlayerConnect(playerid)
{
	if (!IsPlayerNPC(playerid))
	{
		Streamer_AddPlayer(playerid);
	}
	if (Streamer_g_OPC)
	{
		return CallLocalFunction("Streamer_OnPlayerConnect", "d", playerid);
	}
	return 1;
}

#if defined _ALS_OnPlayerConnect
	#undef OnPlayerConnect
#else
	#define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect Streamer_OnPlayerConnect

forward Streamer_OnPlayerConnect(playerid);

public OnPlayerDisconnect(playerid, reason)
{
	if (!IsPlayerNPC(playerid))
	{
		Streamer_RemovePlayer(playerid);
	}
	if (Streamer_g_OPDC)
	{
		return CallLocalFunction("Streamer_OnPlayerDisconnect", "dd", playerid, reason);
	}
	return 1;
}
OnPlayerConnect in streamer.inc

Код:
 
public OnFilterScriptInit()
{
	if (!Streamer_g_RI)
	{
		Streamer_g_OPC = funcidx("Streamer_OnPlayerConnect") != -1;
		Streamer_g_OPDC = funcidx("Streamer_OnPlayerDisconnect") != -1;
		Streamer_g_OPPP = funcidx("Streamer_OnPlayerPickUpPickup") != -1;
		Streamer_g_OPEC = funcidx("Streamer_OnPlayerEnterCP") != -1;
		Streamer_g_OPLC = funcidx("Streamer_OnPlayerLeaveCP") != -1;
		Streamer_g_OPERC = funcidx("Streamer_OnPlayerEnterRaceCP") != -1;
		Streamer_g_OPLRC = funcidx("Streamer_OnPlayerLeaveRaceCP") != -1;
		Streamer_g_RI = true;
		Streamer_RegisterInterface();
	}
	if (funcidx("Streamer_OnFilterScriptInit") != -1)
	{
		return CallLocalFunction("Streamer_OnFilterScriptInit", "");
	}
	return 1;
}

#if defined _ALS_OnFilterScriptInit
	#undef OnFilterScriptInit
#else
	#define _ALS_OnFilterScriptInit
#endif
#define OnFilterScriptInit Streamer_OnFilterScriptInit

forward Streamer_OnFilterScriptInit();
OnFilterscript crap


Re: Streamer - Riddy - 12.06.2011

FIXED!