SA-MP Forums Archive
[Ajuda] Undefinid Symbol - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Undefinid Symbol (/showthread.php?tid=376014)



Undefinid Symbol - Lucas Ventura - 08.09.2012

Baixer essa FS e quando vou compilar da isso!

Код:
C:\Users\Lucas\Desktop\Inet-Security.pwn(44) : error 017: undefined symbol "MAX_CONNECTIONS_FROM_IP"
C:\Users\Lucas\Desktop\Inet-Security.pwn(46) : error 017: undefined symbol "MAX_CONNECTIONS_FROM_IP"
Код:
#include <a_samp>

#if defined FILTERSCRIPT

#define MAX_CONNECTIONS_FROM_IP  3

public OnFilterScriptInit()
	{
		print("\n--------------------------------------");
 		print(" FilterScript Inet Security");
  		print("--------------------------------------\n");
  		print("\n*** Player IP limiting FS (maxips) Loaded. Max connections from 1 IP = %d\n",MAX_CONNECTIONS_FROM_IP);
   		return 1;
	}

public OnFilterScriptExit()
	{
		return 1;
	}

#else

main()
	{
		print("\n----------------------------------");
 		print(" FilterScript Anti-Bot Carregado!");
  		print("----------------------------------\n");
	}

#endif

public OnPlayerConnect(playerid)
	{
    	new connecting_ip[32+1];
    	GetPlayerIp(playerid,connecting_ip,32);
    	new num_players_on_ip = GetNumberOfPlayersOnThisIP(connecting_ip);

    	if(num_players_on_ip > MAX_CONNECTIONS_FROM_IP)
		{
    		printf("MAXIPs: Conectando Player (%d) excedeu %d Conecзхes de IP para %s.", playerid, MAX_CONNECTIONS_FROM_IP, connecting_ip);
    		Kick(playerid);
    		return 1;
    	}
		return 1;

	}

stock GetNumberOfPlayersOnThisIP(test_ip[])
{
    new against_ip[32+1];
    new x = 0;
    new ip_count = 0;
    for(x=0; x<MAX_PLAYERS; x++)
	{
        if(IsPlayerConnected(x))
		{
            GetPlayerIp(x,against_ip,32);
            if(!strcmp(against_ip,test_ip)) ip_count++;
        }
	}
	return ip_count;
}



Re: Undefinid Symbol - Coreia - 08.09.2012

oq o codigo ou o erro kk' fiquei meu wft agora'


Re: Undefinid Symbol - Lucas Ventura - 08.09.2012

edit


Re: Undefinid Symbol - Rhayziin - 08.09.2012




Re: Undefinid Symbol - Lucas Ventura - 08.09.2012

Rhayziin nгo sabe ajudar nгo atrapalha


Re: Undefinid Symbol - Lucas Ventura - 08.09.2012

NInguйm?


Re: Undefinid Symbol - FenixBorn - 08.09.2012

Simbolo indefinido,,criou uma coisa q nao esta usando...


Re: Undefinid Symbol - Lucas Ventura - 08.09.2012

rs, como nгo? olhe o code!


Re: Undefinid Symbol - Bruno Alves - 08.09.2012

pawn Код:
#include <a_samp>


#define MAX_CONNECTIONS_FROM_IP 1



main()
    {
        print("\n----------------------------------");
        print(" FilterScript Anti-Bot Carregado!");
        print("----------------------------------\n");
    }


public OnPlayerConnect(playerid)
{
    new connecting_ip[32+1];
    GetPlayerIp(playerid,connecting_ip,32);
    new num_players_on_ip = GetNumberOfPlayersOnThisIP(connecting_ip);

    if(num_players_on_ip > MAX_CONNECTIONS_FROM_IP)
    {
        printf("Ant-Bot: leitor de ligaзгo (% d) excedido% d conexхes IP de% s.", playerid, MAX_CONNECTIONS_FROM_IP, connecting_ip);
        Kick(playerid);
    }
    return 1;

}

stock GetNumberOfPlayersOnThisIP(test_ip[])
{
    new against_ip[32+1];
    new x = 0;
    new ip_count = 0;
    for(x=0; x<MAX_PLAYERS; x++)
    {
        if(IsPlayerConnected(x))
        {
            GetPlayerIp(x,against_ip,32);
            if(!strcmp(against_ip,test_ip)) ip_count++;
        }
    }
    return ip_count;
}



Re: Undefinid Symbol - Lucas Ventura - 09.09.2012

Bruno, funciona como FS?