Erro ao compilar e comando dararma -
HusteD - 06.08.2018
olб botei um cmd de criar casa no meu gm e esta dando esse erro
C:\Users\Enzo\Desktop\Servidor\gamemodes\GM.pwn(27 5) : error 017: undefined symbol "Casa"
C:\Users\Enzo\Desktop\Servidor\gamemodes\GM.pwn(29 6) : error 017: undefined symbol "Casa"
C:\Users\Enzo\Desktop\Servidor\gamemodes\GM.pwn(29 6) : warning 215: expression has no effect
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
no caso me falaram que tenque definir a variavel mais nao sei fazer isso
e outro quero um sistema de /dararma quando for adm
Re: Erro ao compilar e comando dararma -
HelderPT - 06.08.2018
PHP код:
CMD:dararma(playerid, params[])
{
new id, arma, municao;
if(sscanf(params, "udd", id, arma, municao)) return SendClientMessage(playerid, -1, "Uso correto: /Dararma (ID) (ID-ARMA) (MUNIЗГO)");
GivePlayerWeapon(id, arma, municao);
return 1;
}
Re: Erro ao compilar e comando dararma -
HusteD - 06.08.2018
e o erro do comando criarcasa
Re: Erro ao compilar e comando dararma -
HusteD - 06.08.2018
sim mais quero resolver o erro
Re: Erro ao compilar e comando dararma -
LeViNS - 06.08.2018
Caso use zcmd/pawn.cmd com sscanf isso й funcional:
PHP код:
#include sscanf2 // necessбrio para funcionar
#include zcmd // necessбrio para o comando funcionar
CMD:dararma(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return 1; // Mude isso para a variбvel de admin do seu servidor.
new id, arma, municao, gstring[128];
if(sscanf(params, "udd", id, arma, municao)) return SendClientMessage(playerid, 0xFF0000FF, "Digite: /dararma [id] [arma] [muniзгo]");
if(!municao || municao > 9000) return SendClientMessage(playerid, 0xFF0000FF, "Muniзгo invбlida (Mбximo: 9000).");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "Jogador nгo conectado!");
GivePlayerWeapon(id, arma, municao);
format(gstring, 128, "| ADMIN | O(A) %s te forneceu uma arma de (ID: %d - Muniзгo: %d).", GetPlayerNameEx(playerid), arma, municao);
SendClientMessage(id, 0xFF0000FF, gstring);
SendClientMessage(playerid, 0xFF0000FF, "| ADMIN | Comando efetuado com sucesso!");
return 1;
}
GetPlayerNameEx(playerid) { // caso a funзгo para pegar o nome nгo esteja definida
static NomePlayer[MAX_PLAYER_NAME];
GetPlayerName(playerid, NomePlayer, MAX_PLAYER_NAME);
return NomePlayer;
}
Re: Erro ao compilar e comando dararma -
HusteD - 06.08.2018
C:\Users\Enzo\Desktop\Servidor\pawno\include\Pawn. CMD.inc(56) : error 025: function heading differs from prototype
C:\Users\Enzo\Desktop\Servidor\pawno\include\Pawn. CMD.inc(60) : error 025: function heading differs from prototype
C:\Users\Enzo\Desktop\Servidor\pawno\include\zcmd. inc(1
: warning 201: redefinition of constant/macro (symbol "COMMAND:%1(%2)")
C:\Users\Enzo\Desktop\Servidor\pawno\include\zcmd. inc(21) : warning 201: redefinition of constant/macro (symbol "CMD:%1(%2)")
C:\Users\Enzo\Desktop\Servidor\pawno\include\zcmd. inc(27) : warning 201: redefinition of constant/macro (symbol "cmd(%1,%2,%3)")
C:\Users\Enzo\Desktop\Servidor\gamemodes\GM.pwn(31 7) : error 017: undefined symbol "GetPlayerNameEx"
C:\Users\Enzo\Desktop\Servidor\gamemodes\GM.pwn(32 4) : warning 203: symbol is never used: "pNome"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.