SA-MP Forums Archive
Foreach - 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)
+--- Thread: Foreach (/showthread.php?tid=567442)



Foreach - Pocetnik - 13.03.2015

I get this error

Код:
C:\Users\PC\Desktop\ECRPG\ECRPG\gamemodes\ECRPG.pwn(6503) : error 021: symbol already defined: "Itter_OnPlayerDisconnect"
Код:
else
	{
	    new rand = random(5000); rand += 2158;
	    Jackpot += rand;
	    SaveStuff();
	    format(string, sizeof(string), "Loto vesti: JackPot je povecan na $%d.", Jackpot);
		OOCOff(COLOR_WHITE, string);
	}
	return 1;
}

//------------------------------------------------------------------------------------------------------
public OnPlayerDisconnect(playerid, reason)
{                                                                  //It show me error here
	new textreason[64];
	new plname[24];
	GetPlayerName(playerid, plname, sizeof(plname));
	new playersip[24];
	GetPlayerIp(playerid, playersip, sizeof(playersip));
	new string2[128];
	SafeResetPlayerWeapons(playerid);
	if(PlayerInfo[playerid][pAdminDuty] == 1)
	{
		SafeResetPlayerWeapons(playerid);
	}
	if(Searching[playerid] == 1)
	{
		RemovePlayerMapIcon(playerid, 500 + playerid);
		Searching[playerid] = 0;
	}
Please help me
P.S.: I have one #include <foreach>


Re: Foreach - Misiur - 13.03.2015

Are you sure you have single OnPlayerDisconnect?


Re: Foreach - Pocetnik - 14.03.2015

Yes, i'am sure


Re: Foreach - Pocetnik - 15.03.2015

Look i have just one OnPlayerDisconnect and these are my includes

Код:
#include <a_samp>
#include <foreach>
#include <core>
#include <float>
#include <time>
#include <file>
#include <utils>
#include <morphinc>
#include <a_npc>
#include <streamer>
#include <Dini>
#include <dutils>



Re: Foreach - Pocetnik - 17.03.2015

I am sure