[Ajuda] 1 Erros. Rбpido E Simples.
#1

Ajuda Ae, Ta Dando 1 Erro. Nao Consigo Resolver!
Quote:

C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(253) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Linha:
Quote:

ProxDetector(30.0, playerid, string,0xFF0000FF,0xFF0000FF,0xFF0000FF,0xFF0000FF ,0xFF0000FF)

Ajuda.

Vlw.
Reply
#2

Poste algumas linhas anteriores а linha 253.
Reply
#3

Shadow ~~~>
Quote:

if(strcmp(cmd, "/gritar", true) == 0 || strcmp(cmd, "/g", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, 0xFF0000FF, "USO: (/g)ritar [local chat]");
return 1;
}
if(FicarRoco[playerid] >= 5)
{
SendClientMessage(playerid,0xFF0000FF,"Vocк Estб Rouco! Vб atй uma farmбcia comprar Pastilha!.");
SendClientMessage(playerid,0xFF0000FF,"OBS: A farmбcia fica em frente ao banco da cidade!.");
return 1;
}
for(new luplay=0;luplay<6;luplay++){
if(strfind(result, IP[luplay], true) != -1){result = "PКGO EM FRБGRANTE!!!Jogador tentando divulgar algum IP.";}}
format(string, sizeof(string), "%s Berra: %s!!", sendername, result);
FicarRoco[playerid]++;
printf("[chat] [grito] [%s] %s", sendername, result);
ProxDetector(30.0, playerid, string,0xFF0000FF,0xFF0000FF,0xFF0000FF,0xFF0000FF ,0xFF0000FF);
}
return 1;
}

Ta Ai O Comando Todo.
Reply
#4

pawn Код:
ProxDetector(30.0, playerid, string, 0xFF0000FF,0xFF0000FF,0xFF0000FF,0xFF0000FF ,0xFF0000FF);
Reply
#5

PHP код:
if(strcmp(cmd, "/gritar", true) == 0 || strcmp(cmd, "/g", true) == 0)
{
    if(
IsPlayerConnected(playerid))
    {
        
GetPlayerName(playerid, sendername, sizeof(sendername));
        new 
str[200];
        new 
length = strlen(cmdtext);
        while ((
idx < length) && (cmdtext[idx] <= ' '))
        {
            
idx++;
        }
        new 
offset = idx;
        new 
result[64];
        while ((
idx < length) && ((idx - offset) < (sizeof(result) - 1)))
        {
            
result[idx - offset] = cmdtext[idx];
            
idx++;
        }
        
result[idx - offset] = EOS;
        if(!
strlen(result))
        {
            
SendClientMessage(playerid, 0xFF0000FF, "USO: (/g)ritar [local chat]");
            return 
1;
        }
        if(
FicarRoco[playerid] >= 5)
        {
            
SendClientMessage(playerid,0xFF0000FF,"Vocк Estб Rouco! Vб atй uma farmбcia comprar Pastilha!.");
            
SendClientMessage(playerid,0xFF0000FF,"OBS: A farmбcia fica em frente ao banco da cidade!.");
            return 
1;
        }
        for(new 
luplay=0;luplay<6;luplay++){
        if(
strfind(result, IP[luplay], true) != -1){result = "PКGO EM FRБGRANTE!!!Jogador tentando divulgar algum IP.";}}
        
format(str, sizeof(str), "%s Berra: %s!!", sendername, result);
        
FicarRoco[playerid]++;
        
printf("[chat] [grito] [%s] %s", sendername, result);
        
ProxDetector(30.0, playerid, str,0xFF0000FF,0xFF0000FF,0xFF0000FF,0xFF0000FF ,0xFF0000FF);
    }
    return 
1;
} 
Reply
#6

Continua A Aparecer Isto:
Quote:

C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(254) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Reply
#7

Testa..
pawn Код:
if(!strcmp(cmd, "/gritar", true)  || !strcmp(cmd, "/g", true))
{
    if(!IsPlayerConnected(playerid)) return 1;
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; }
    new offset = idx, result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; }
    result[idx - offset] = EOS;
    if(!strlen(result)) return SendClientMessage(playerid, 0xFF0000FF, "USO: (/g)ritar [local chat]");
    if(FicarRoco[playerid] >= 5) return SendClientMessage(playerid,0xFF0000FF,"Vocк Estб Rouco! Vб atй uma farmбcia comprar Pastilha!."), SendClientMessage(playerid,0xFF0000FF,"OBS: A farmбcia fica em frente ao banco da cidade!.");
    for(new i = 0x0; i < 6; ++i) {
        if(strfind(result, IP[i], true) != -1)
        {
            result = "PКGO EM FRБGRANTE!!!Jogador tentando divulgar algum IP.";
        }
    }
    format(string, sizeof(string), "%s Berra: %s!!", sendername, result);
    FicarRoco[playerid]++;
    printf("[chat] [grito] [%s] %s", sendername, result);
    ProxDetector(30.0, playerid, string,0xFF0000FF,0xFF0000FF,0xFF0000FF,0xFF0000FF,0xFF0000FF);
    return 0x01;
}
Reply
#8

O erro estб no 3є argumento eu acho.
Reply
#9

Quote:
Originally Posted by Shickcard
Посмотреть сообщение
O erro estб no 3є argumento eu acho.
Sim ... Й como ele nгo reconhecesse que str/string й uma string.

Todavia, o codigo estб correto.

Tymer, vocк troque a public ProxDetector por esta:

PHP код:
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
Float:posx, Float:posy, Float:posz;
        new 
Float:oldposx, Float:oldposy, Float:oldposz;
        new 
Float:tempposx, Float:tempposy, Float:tempposz;
        
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        for(new 
i = 0; i < MAX_PLAYERS; i++)
        {
            if(
IsPlayerConnected(i))
            {
                
GetPlayerPos(i, posx, posy, posz);
                
tempposx = (oldposx -posx);
                
tempposy = (oldposy -posy);
                
tempposz = (oldposz -posz);
                if (((
tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
                {
                    
SendClientMessage(i, col1, string);
                }
                else if (((
tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
                {
                    
SendClientMessage(i, col2, string);
                }
                else if (((
tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
                {
                    
SendClientMessage(i, col3, string);
                }
                else if (((
tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
                {
                    
SendClientMessage(i, col4, string);
                }
                else if (((
tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
                {
                    
SendClientMessage(i, col5, string);
                }
            }
            else
            {
                
SendClientMessage(i, col1, string);
            }
        }
    }
    return 
1;
} 
Reply
#10

Ricop, Testei Nao Deu, Shadow, Tmb Testei E Agora Aparece Isto:
Quote:

C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\pawno\include\dini.inc(239) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(254) : error 035: argument type mismatch (argument 3)
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(492) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Alexandre\Documents\Biblioteca\Alex\GTA San Andreas Multy E Singleplayer\GTA Samp\Servidor\Server Main File 3\gamemodes\RPG.pwn(492) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)