[Ajuda] Ajuda ZCMD erro
#1

Olб,

Eu quando tem compilar o meu GM da me este erro :
Код:
C:\Users\Bruno\Desktop\Portugal Realidade Virtual\pawno\include\ZCMD.inc(66) : error 021: symbol already defined: "OnGameModeInit"
C:\Users\Bruno\Desktop\Portugal Realidade Virtual\pawno\include\ZCMD.inc(87) : error 021: symbol already defined: "OnPlayerCommandText"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

As Publics Jб estгo definidas .
Reply
#3

Quote:
Originally Posted by Wendell
Посмотреть сообщение
As Publics Jб estгo definidas .
sim isso eu sei so gostava de saber como resolver estes erros
Reply
#4

Quote:
Originally Posted by BrunoMC09
Посмотреть сообщение
sim isso eu sei so gostava de saber como resolver estes erros
Se estiver duas publics iguais , deleta uma .
Reply
#5

Quote:
Originally Posted by Wendell
Посмотреть сообщение
Se estiver duas publics iguais , deleta uma .
Peзo desculpa mas eu ainda sou um novato pode explicar melhor!

Aproveito e deixo aqui o zcmd:
Код:
/**********************************
 *                                *
 *   @Author:      ZeeX           *
 *   @Version:     0.3.1          *
 *   @Released:    31/10/2009     *
 *                                *
 **********************************/

#include <a_samp>

#if defined _zcmd_included
	#endinput
#endif
#define _zcmd_included

#define MAX_FUNC_NAME (32)

#define COMMAND:%1(%2)          \
			forward cmd_%1(%2); \
			public cmd_%1(%2)

#define CMD:%1(%2) \
			COMMAND:%1(%2)

#define command(%1,%2,%3) \
			COMMAND:%1(%2, %3)

#define cmd(%1,%2,%3) \
			COMMAND:%1(%2, %3)

#if !defined isnull
	#define isnull(%1) \
				((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif


forward OnPlayerCommandReceived(playerid, cmdtext[]);
forward OnPlayerCommandPerformed(playerid, cmdtext[], success);


static
	bool:zcmd_g_HasOPCS = false,
	bool:zcmd_g_HasOPCE = false;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	zcmd_g_HasOPCS = funcidx("OnPlayerCommandReceived") != -1;
	zcmd_g_HasOPCE = funcidx("OnPlayerCommandPerformed") != -1;
    return CallLocalFunction("zcmd_OnFilterScriptInit", "");
}

#if defined _ALS_OnFilterScriptInit
    #undef OnFilterScriptInit
#else
    #define _ALS_OnFilterScriptInit
#endif
forward zcmd_OnFilterScriptInit();
#define OnFilterScriptInit zcmd_OnFilterScriptInit


#else /*not a filterscript*/

public OnGameModeInit()
{
	zcmd_g_HasOPCS = funcidx("OnPlayerCommandReceived") != -1;
	zcmd_g_HasOPCE = funcidx("OnPlayerCommandPerformed") != -1;
	if (funcidx("zcmd_OnGameModeInit") != -1)
	{
		return CallLocalFunction("zcmd_OnGameModeInit", "");
	}
	return 1;
}

#if defined _ALS_OnGameModeInit
    #undef OnGameModeInit
#else
    #define _ALS_OnGameModeInit
#endif
#define OnGameModeInit zcmd_OnGameModeInit
forward zcmd_OnGameModeInit();

#endif /*if defined FILTERSCRIPT*/

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (zcmd_g_HasOPCS && !CallLocalFunction("OnPlayerCommandReceived", "is", playerid, cmdtext))
    {
        return 1;
    }
    new
        pos,
        funcname[MAX_FUNC_NAME];
    while (cmdtext[++pos] > ' ')
	{
		funcname[pos-1] = tolower(cmdtext[pos]);
	}
	format(funcname, sizeof(funcname), "cmd_%s", funcname);
    while (cmdtext[pos] == ' ') pos++;
	if (!cmdtext[pos])
	{
		if (zcmd_g_HasOPCE)
		{
			return CallLocalFunction("OnPlayerCommandPerformed", "isi", playerid, cmdtext, CallLocalFunction(funcname, "is", playerid, "\1"));
		}
		return CallLocalFunction(funcname, "is", playerid, "\1");
	}
	if (zcmd_g_HasOPCE)
	{
		return CallLocalFunction("OnPlayerCommandPerformed", "isi", playerid, cmdtext, CallLocalFunction(funcname, "is", playerid, cmdtext[pos]));
	}
	return CallLocalFunction(funcname, "is", playerid, cmdtext[pos]);
}

#if defined _ALS_OnPlayerCommandText
    #undef OnPlayerCommandText
#else
    #define _ALS_OnPlayerCommandText
#endif
#define OnPlayerCommandText zcmd_OnPlayerCommandText
forward zcmd_OnPlayerCommandText(playerid, cmdtext[]);
Reply
#6

Nгo tinha percebido й uma Include , entгo baixa a mais atualizada que resolve esses erros .
Reply
#7

Quote:

Nгo tinha percebido й uma Include , entгo baixa a mais atualizada que resolve esses erros .

Eu ja baixei a mais recente mas continua a dar o msm erro
Reply
#8

http://www.mediafire.com/?m5la9meidaknhl9
Reply
#9

Quote:
Originally Posted by MatheusAlcapone
Посмотреть сообщение
Ja fiz o download e ja pos no sitio mas continua a dar o msm erro
Reply
#10

pawn Код:
#include < zcmd > // Definir ZCMD
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) // O Seu Erro '-
sу para comandos em strcmp, comandos ZCMD nao precisa estar dentro dela e por isso da erro.

Coloque os CMD: fora desta public OnPlayerCommandText(playerid, cmdtext[])

Em Caso de Dъvidas manda Msg por Privado ^_^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)