[Ajuda] Muitos erros
#1

Antes nгo dava esse erro, agora fui compilar e deu ele, achei estranho pois tenho o amx antes de compilar e ele funcionava certo,
Код:
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8809) : warning 217: loose indentation
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8809) : error 012: invalid function call, not a valid address
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8809) : warning 215: expression has no effect
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8809) : error 001: expected token: ";", but found ")"
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8809) : error 029: invalid expression, assumed zero
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8809) : fatal error 107: too many error messages on one line
Reply
#2

Cуdigo?
Reply
#3

Код:
if(strcmp(cmd, "/carona", true) == 0)
	{
		new aname[MAX_PLAYER_NAME];
		new pname[MAX_PLAYER_NAME];


			if(pAdmin(playerid) == 1 || pAdmin(playerid) == 2 || pAdmin(playerid) == 3 || pAdmin(playerid) == 4 || pAdmin(playerid) == 5)
		{
			new tmp[256], plid;
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, Vermelho, "Digite: /carona [id]");
				return 1;
			}
			plid = strval(tmp);
			if(plid == playerid)
			{
				SendClientMessage(playerid, Vermelho, "Vocк nгo pode pegar uma carona com vocк mesmo.");
				return 1;
			}
			if(!IsPlayerConnected(plid))
			{
				SendClientMessage(playerid, Vermelho, "O(A) jogador(a) nгo estб conectado.");
			}
			else
			{
				if(IsPlayerInAnyVehicle(plid))
				{
					new VehicleID = GetPlayerVehicleID(plid);
					PutPlayerInVehicle(playerid, VehicleID, 1);
					GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
					SendClientMessage(playerid, Verde, "Comando efetuado com sucesso!");
					format(string, sizeof(string), "O(A) ADM %s (%d) entrou no seu carro!", aname, playerid);
					SendClientMessage(plid, tcadm, string);
				}
				else
				{
					GetPlayerName(plid, pname, MAX_PLAYER_NAME);
					format(string, sizeof(string), "%s (%d) nгo estб em um carro!", pname, plid);
					SendClientMessage(playerid, Vermelho, string);
				}
			}
		}
		else
		{
			SendClientMessage(playerid, Vermelho, "Apenas ADM's podem usar este comando!");
		}
		return 1;
	}
Reply
#4

Qual й a linha que estб o erro?
Reply
#5

a linha do erro й essa
Код:
if(pAdmin(playerid) == 1 || pAdmin(playerid) == 2 || pAdmin(playerid) == 3 || pAdmin(playerid) == 4 || pAdmin(playerid) == 5)
Reply
#6

Quote:
Originally Posted by Thurss
Посмотреть сообщение
a linha do erro й essa
Код:
if(pAdmin(playerid) == 1 || pAdmin(playerid) == 2 || pAdmin(playerid) == 3 || pAdmin(playerid) == 4 || pAdmin(playerid) == 5)
Muda para:

if(pAdmin[playerid] >= 1 && pAdmin[playerid] <= 5)
Reply
#7

Quote:
Originally Posted by SW1FTmeister
Посмотреть сообщение
Muda para:

if(pAdmin[playerid] >= 1 && pAdmin[playerid] <= 5)
Ta dando isso agora :
Код:
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8807) : warning 217: loose indentation
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8845) : warning 217: loose indentation
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8849) : warning 217: loose indentation
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8855) : error 035: argument type mismatch (argument 1)
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8902) : warning 217: loose indentation
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8902) : error 035: argument type mismatch (argument 1)
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8934) : warning 217: loose indentation
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8939) : error 012: invalid function call, not a valid address
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8939) : warning 215: expression has no effect
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8939) : error 001: expected token: ";", but found ")"
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8939) : error 029: invalid expression, assumed zero
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8939) : fatal error 107: too many error messages on one line
Reply
#8

Quote:
Originally Posted by Thurss
Посмотреть сообщение
Ta dando isso agora :
Код:
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8807) : warning 217: loose indentation
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8845) : warning 217: loose indentation
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8849) : warning 217: loose indentation
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8855) : error 035: argument type mismatch (argument 1)
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8902) : warning 217: loose indentation
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8902) : error 035: argument type mismatch (argument 1)
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8934) : warning 217: loose indentation
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8939) : error 012: invalid function call, not a valid address
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8939) : warning 215: expression has no effect
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8939) : error 001: expected token: ";", but found ")"
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8939) : error 029: invalid expression, assumed zero
  Segunda Vida\gamemodes\BrasilSegundaVida.pwn(8939) : fatal error 107: too many error messages on one line
Linhas? Jб agora, pAdmin estб definido no topo do GM?
Reply
#9

Cуdigo da linha 8855
Код:
(strcmp(cmd, "/injetar", true) == 0)
	{
		new aname[MAX_PLAYER_NAME];
		if(strcmp(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || PlayerInfo[playerid][SCON] == true)
Linha do erro 8855 :
Код:
if(strcmp(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || PlayerInfo[playerid][SCON] == true)

Estб definido sim, na linha 709 estб assim :
Код:
new pAdmin[MAX_PLAYERS];
Reply
#10

Quote:
Originally Posted by Thurss
Посмотреть сообщение
Cуdigo da linha 8855
Код:
(strcmp(cmd, "/injetar", true) == 0)
	{
		new aname[MAX_PLAYER_NAME];
		if(strcmp(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || PlayerInfo[playerid][SCON] == true)
Linha do erro 8855 :
Код:
if(strcmp(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || PlayerInfo[playerid][SCON] == true)
Tira o strcmp.

Fica assim:

ANTES:

pawn Код:
if(strcmp(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || PlayerInfo[playerid][SCON] == true)
DEPOIS:

pawn Код:
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 || PlayerInfo[playerid][SCON] == true)
PS: Faзa isso em todos os locais que tiver.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)