[Ajuda] Comando com warnings
#1

Esses dois comandos ta com essas desgraзa:

Код:
C:\Users\Natan\Desktop\Servidor\gamemodes\GM.pwn(18520) : warning 202: number of arguments does not match definition
C:\Users\Natan\Desktop\Servidor\gamemodes\GM.pwn(18538) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
PHP код:
CMD:abseg(playerid){
    if(
NaFaculdade[playerid] == 1) return SendClientMessage(playeridVermelho"Vocк estб na biblioteca e estб incapacitado de fazer isto.");
    if(
preso[playerid] == 1) return SendClientMessage(playeridVermelho"Vocк estб incapacitado de fazer isto pois estб preso.");
    if(
algemado[playerid] == 1) return SendClientMessage(playeridVermelho"Vocк estб incapacitado de fazer isto pois estб algemado.");
    if(
cercado[playerid] == 1) return SendClientMessage(playeridVermelho"Vocк estб incapacitado de fazer isto pois estб cercado.");
    if(
nogame[playerid] == 1) return SendClientMessage(playeridVermelho"Vocк estб incapacitado de fazer isto pois estб em um game!");
    if(
autoescola[playerid] == 1) return SendClientMessage(playeridVermelho"Vocк estб incapacitado de fazer isto pois estб na Auto-Escola!");
    if(
dini_Int(file"Profissao") == Policial_C || dini_Int(file"Profissao") == Policial_F || dini_Int(file"Profissao") == Delegado || dini_Int(file"Profissao") == Bope || dini_Int(file"Profissao") == Swat || dini_Int(file"Profissao") == Narcoticos || dini_Int(file"Profissao") == Interpol || dini_Int(file"Profissao") == Policial_M || dini_Int(file"Profissao") == FBI || dini_Int(file"Profissao") == LSPD || dini_Int(file"aAdmin") == 1)
    if(
IsPlayerInRangeOfPoint(playerid10.03152.6001, -604.5999813.8) || IsPlayerInRangeOfPoint(playerid10.03163.7, -60913.6) || IsPlayerInRangeOfPoint(playerid10.03190.5, -566.2999913.6) || IsPlayerInRangeOfPoint(playerid10.03201, -609.799999.8) || IsPlayerInRangeOfPoint(playerid10.03163.7, -600.0999813.6))
    {
        
OpenPrisonGate();
        
SendClientMessage(playeridAzul"Portхes abrindo, para fechar use /fcseg.");
    }else{
        
SendClientMessage(playeridCOR_ERRO"Vocк nгo estб na Prisгo de seguranзa maxima!");
    }
    return 
1;
}
CMD:fcseg(playerid){
    if(
NaFaculdade[playerid] == 1) return SendClientMessage(playeridVermelho"Vocк estб na biblioteca e estб incapacitado de fazer isto.");
    if(
preso[playerid] == 1) return SendClientMessage(playeridVermelho"Vocк estб incapacitado de fazer isto pois estб preso.");
    if(
algemado[playerid] == 1) return SendClientMessage(playeridVermelho"Vocк estб incapacitado de fazer isto pois estб algemado.");
    if(
cercado[playerid] == 1) return SendClientMessage(playeridVermelho"Vocк estб incapacitado de fazer isto pois estб cercado.");
    if(
nogame[playerid] == 1) return SendClientMessage(playeridVermelho"Vocк estб incapacitado de fazer isto pois estб em um game!");
    if(
autoescola[playerid] == 1) return SendClientMessage(playeridVermelho"Vocк estб incapacitado de fazer isto pois estб na Auto-Escola!");
    if(
dini_Int(file"Profissao") == Policial_C || dini_Int(file"Profissao") == Policial_F || dini_Int(file"Profissao") == Delegado || dini_Int(file"Profissao") == Bope || dini_Int(file"Profissao") == Swat || dini_Int(file"Profissao") == Narcoticos || dini_Int(file"Profissao") == Interpol || dini_Int(file"Profissao") == Policial_M || dini_Int(file"Profissao") == FBI || dini_Int(file"Profissao") == LSPD || dini_Int(file"aAdmin") == 1)
    if(
IsPlayerInRangeOfPoint(playerid10.03152.6001, -604.5999813.8) || IsPlayerInRangeOfPoint(playerid10.03163.7, -60913.6) || IsPlayerInRangeOfPoint(playerid10.03190.5, -566.2999913.6) || IsPlayerInRangeOfPoint(playerid10.03201, -609.799999.8) || IsPlayerInRangeOfPoint(playerid10.03163.7, -600.0999813.6))
    {
        
ClosePrisonGate();
        
SendClientMessage(playeridAzul"Portхes abertos, para abrir use /abseg.");
    }else{
        
SendClientMessage(playeridCOR_ERRO"Vocк nгo estб na Prisгo de seguranзa maxima!");
    }
    return 
1;
}
//Publics
forward OpenPrisonGate(gateid);
public 
OpenPrisonGate(gateid)
{
    switch(
gateid)
    {
        case 
1:MoveDynamicObject(MSP_Gates[1], 3152.6001, -590.4013.81.00090);
        case 
2:MoveDynamicObject(MSP_Gates[2],3163.7, -617.299913.61.000270), MoveDynamicObject(MSP_Gates[3], 3163.7, -591.599613.6,  1.00090);
        case 
3:MoveDynamicObject(MSP_Gates[4], 3197.8999, -566.2999913.6,  1.0000);
        case 
4:MoveDynamicObject(MSP_Gates[5], 3201, -6139.81.00090);
    }
    return 
1;
}
forward ClosePrisonGate(gateid);
public 
ClosePrisonGate(gateid)
{
    switch(
gateid)
    {
        case 
1:MoveDynamicObject(MSP_Gates[1], 3152.6001, -604.5999813.8,  1.00090);
        case 
2:MoveDynamicObject(MSP_Gates[2],3163.7, -60913.6,  1.000270), MoveDynamicObject(MSP_Gates[3], 3163.7, -600.0999813.6,  1.00090);
        case 
3:MoveDynamicObject(MSP_Gates[4], 3190.5, -566.2999913.6,  1.0000);
        case 
4:MoveDynamicObject(MSP_Gates[5], 3201, -609.799999.8,  1.00090);
    }
    return 
1;

Reply
#2

Me manda sу as linhas dos erros ae.
Reply
#3

Tente colocar o nъmero do portгo nos parкnteses

Код:
new gate;
if(isnull(gate) || gate > 4) return SendClientMessage(playerid, Vermelho, "Use /abseg [Portгo: 1-4]");
OpenPrisonGate(gate);
Код:
new gate;
if(isnull(gate) ||  gate > 4) return SendClientMessage(playerid, Vermelho, "Use /fcseg [Portгo: 1-4]");
ClosePrisonGate(gate);
Sу pra lembrar, nгo mexo com ZCMD, entгo nгo sei se tб certo o uso das variбveis... Mas й essa a ideia
Reply
#4

warning 202: number of arguments does not match definition

numeros de argumenrtos nao batem com a definiзao, alguma funзao esta com parametros a menos ou a mais
Reply
#5

Quote:
Originally Posted by moura98
Посмотреть сообщение
warning 202: number of arguments does not match definition

numeros de argumenrtos nao batem com a definiзao, alguma funзao esta com parametros a menos ou a mais
oque vem a ser "argumenrtos" serio sу uma dica estuda um pouco de portuguкs antes de criar seus cуdigos porque se vocк escrever assim em algum fs meu deus '--'-''
Reply
#6

bem aqui vc ira saber oq e argumentos
Reply
#7

"Se ta dando warning й por que ta dando certo" ashuahsua

@Post

Tente procurar sobre a syntax na wiki sa-mp, lб eles te mostram todos argumentos existentes em suas syntax, se caso for includes feitas por membros da comunidade sa-mp, vocк pode encontrar os argumentos diretamente no post da include.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)