[Ajuda] 4 Errors
#1

Bom estou iniciando minha criaзгo de gm do 0, estou estudando alguns gms para eu aprender mais, mais decidi comeзar meu proprio gm mais deu 4 erros que nгo acho soluзгo...

Erros
Код:
 C:\Users\Fabio\Desktop\XX.pwn(49) : error 010: invalid function or declaration
C:\Users\Fabio\Desktop\XX.pwn(53) : error 010: invalid function or declaration
C:\Users\Fabio\Desktop\XX.pwn(56) : error 010: invalid function or declaration
C:\Users\Fabio\Desktop\XX.pwn(60) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
4 Errors.

Linhas
Код:
 49 if(strcmp(cmd, "/colete", true) == 0) 
          53 return 1;
          56 if(strcmp(cmdtext, "/creditos", true) == 0)
          60 return true;
se puderem me ajudar por favor ! agradeзo desde jб
Reply
#2

tenta ai
Quote:

if(strcmp(cmd, "/colete", true) == 0)
{
// coloque aki as funcoes do comando
}
return 1;
if(strcmp(cmdtext, "/creditos", true) == 0)
{
// coloque aki as funcoes do comando
}
return true;

Reply
#3

Quote:
Originally Posted by TheHiredKillers
Посмотреть сообщение
tenta ai
Fera estб igual eu postei os comandos vou te mostrar inteiro

Код:
 if(strcmp(cmd, "/vida", true) == 0)
	{
        SetPlayerHealth(playerid, 100);
		SendClientMessage(playerid,COR_AZUL,"Vocк Encheu Sua Vida GameMode feito do 0 por Fбbio Stralioti.");
    	return 1;
	}

	return 0;
}
Reply
#4

se preferir
Quote:

if(strcmp(cmd, "/colete", true) == 0)
{
// coloque aki as funcoes do comando
}
return 1;

if(strcmp(cmdtext, "/creditos", true) == 0)
{
// coloque aki as funcoes do comando
}
return true;

Reply
#5

ata bota assim pra ve
Quote:

if(strcmp(cmd, "/vida", true) == 0)
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid,COR_AZUL,"Vocк Encheu Sua Vida GameMode feito do 0 por Fбbio Stralioti.");
return 1;
}

return 0;
}

Reply
#6

Quote:
Originally Posted by TheHiredKillers
Посмотреть сообщение
se preferir
Como eu disse acima meu cуdigo estб igual amigo
Reply
#7

entao mostra mais codigo para a gente ver.

Alem disso ta colocando na callback OnPlayerCommandText ?
Reply
#8

Quote:
Originally Posted by PT
Посмотреть сообщение
entao mostra mais codigo para a gente ver.

Alem disso ta colocando na callback OnPlayerCommandText ?
estб sim amigo

Код:
 public OnPlayerCommandText(playerid, cmdtext[])
{
	new idx;
	new cmd[256];
	
	cmd = strtok(cmdtext, idx);

	if(strcmp(cmd, "/vida", true) == 0)
	{
        SetPlayerHealth(playerid, 100);
		SendClientMessage(playerid,COR_AZUL,"Vocк Encheu Sua Vida GameMode feito do 0 por Fбbio Stralioti.");
    	return 1;
	}

	return 0;
}

	if(strcmp(cmd, "/colete", true) == 0)
	{
		SetPlayerArmour(playerid, 100);
        SenClientMessage(playerid,COR_AZUL,"Vocк Encheu Seu Colete GameMod feito do 0 por Fбbio Stralioti.");
        return 1;
	}

    if(strcmp(cmdtext, "/creditos", true) == 0)
  {
    SendClientMessage(playerid,-1,"GameMod feito do 0 Por : Fбbio Stralioti");
    SendClientMessage(playerid,-1,"Agredecimentos : LeoTOB");
    return true;
  }
ae parceiro desde o onplayercommandtext
Reply
#9

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new idx;
    new cmd[256];
   
    cmd = strtok(cmdtext, idx);
   
    if(strcmp(cmd, "/vida", true) == 0)
    {
        SetPlayerHealth(playerid, 100);
        SendClientMessage(playerid,COR_AZUL,"Vocк Encheu Sua Vida GameMode feito do 0 por Fбbio Stralioti.");
        return 1;
    }
    if(strcmp(cmd, "/colete", true) == 0)
    {
        SetPlayerArmour(playerid, 100);
        SenClientMessage(playerid,COR_AZUL,"Vocк Encheu Seu Colete GameMod feito do 0 por Fбbio Stralioti.");
        return 1;
    }
    if(strcmp(cmdtext, "/creditos", true) == 0)
    {
        SendClientMessage(playerid,-1,"GameMod feito do 0 Por : Fбbio Stralioti");
        SendClientMessage(playerid,-1,"Agredecimentos : LeoTOB");
        return 1;
    }
    return 0;
}
usa sscanf й melhor usa stock n '--'
http://forum.sa-mp.com/showthread.ph...17#post2671917
[TUTO] do @PT
Reply
#10

Quote:
Originally Posted by lKoDlFuLLaNNo
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new idx;
    new cmd[256];
   
    cmd = strtok(cmdtext, idx);
   
    if(strcmp(cmd, "/vida", true) == 0)
    {
        SetPlayerHealth(playerid, 100);
        SendClientMessage(playerid,COR_AZUL,"Vocк Encheu Sua Vida GameMode feito do 0 por Fбbio Stralioti.");
        return 1;
    }
    if(strcmp(cmd, "/colete", true) == 0)
    {
        SetPlayerArmour(playerid, 100);
        SenClientMessage(playerid,COR_AZUL,"Vocк Encheu Seu Colete GameMod feito do 0 por Fбbio Stralioti.");
        return 1;
    }
    if(strcmp(cmdtext, "/creditos", true) == 0)
    {
        SendClientMessage(playerid,-1,"GameMod feito do 0 Por : Fбbio Stralioti");
        SendClientMessage(playerid,-1,"Agredecimentos : LeoTOB");
        return 1;
    }
    return 0;
}
usa sscanf й melhor usa stock n '--'
http://forum.sa-mp.com/showthread.ph...17#post2671917
[TUTO] do @PT
Obrigado Amigo +rep, vou dar uma olhada neste tutorial tambйm
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)