[Ajuda] ME ajudem erro de compilaзгo
#1

Ajuda

Код:
F:\------------------------------------------\gamemodes\Final.pwn(3697) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3887) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3891) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3896) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3902) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3906) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3910) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3914) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3918) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3923) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3929) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3939) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3951) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3955) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3959) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3963) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3967) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3979) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3983) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3987) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3991) : error 004: function "PlayerToPoint" is not implemented

F:\------------------------------------------\gamemodes\Final.pwn(3995) : error 004: function "PlayerToPoint" is not implemented

F:\---------------------------------\gamemodes\Final.pwn(3999) : error 004: function "PlayerToPoint" is not implemented

F:----------------------------\gamemodes\Final.pwn(4003) : error 004: function "PlayerToPoint" is not implemented

F:------------------------\gamemodes\Final.pwn(4014) : error 004: function "PlayerToPoint" is not implemented

F:----------------------\gamemodes\Final.pwn(4025) : error 004: function "PlayerToPoint" is not implemented

Compilation aborted.
Compilation aborted.Pawn compiler 3.2.3664                          Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Penso que basta 2 linha, jб que o problema й o mesmo:
Linha 4014
pawn Код:
if(PlayerToPoint(50.0,playerid,1131.2491,8.3189,1002.0859) || PlayerToPoint(50.0,playerid,1122.0430,-10.4218,1002.0859) || PlayerToPoint(50.0,playerid,1135.7460,-5.7483,1000.6797) || PlayerToPoint(50.0,playerid,2310.0381,-14.1232,26.7422) || PlayerToPoint(50.0,playerid,2314.1396,-3.8086,26.7422))
Linha 4003
pawn Код:
else if(PlayerToPoint(4.0, playerid, BarAqX, BarAqY, BarAqZ) && BarMontado == 1)
Reply
#2

Este erro ocorre quando acontece isto:
PHP код:
forward Opoa(v,v1,v2);
main()
{
    
Opoa(1,3,4);


Ou seja vocк deveria fazer isto para concertar:
PHP код:
public PlayerToPoint(Float:radiplayeridFloat:xFloat:yFloat:z)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
Float:oldposxFloat:oldposyFloat:oldposz;
        new 
Float:tempposxFloat:tempposyFloat:tempposz;
        
GetPlayerPos(playeridoldposxoldposyoldposz);
        
tempposx = (oldposx -x);
        
tempposy = (oldposy -y);
        
tempposz = (oldposz -z);
        
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
        
if (((tempposx radi) && (tempposx > -radi)) && ((tempposy radi) && (tempposy > -radi)) && ((tempposz radi) && (tempposz > -radi)))
        {
            return 
true;
        }
    }
    return 
0;

Mas aconselho vocк trocar todas elas por IsPlayerInRangeOfPoint(Nгo hб diferenca porem uma ja e nativa do samp por isto aconselho ela )
Reply
#3

Quote:
Originally Posted by DayvisonJJB
Посмотреть сообщение
Este erro ocorre quando acontece isto:
PHP код:
forward Opoa(v,v1,v2);
main()
{
    
Opoa(1,3,4);

Ou seja vocк deveria fazer isto para concertar:
PHP код:
public PlayerToPoint(Float:radiplayeridFloat:xFloat:yFloat:z)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
Float:oldposxFloat:oldposyFloat:oldposz;
        new 
Float:tempposxFloat:tempposyFloat:tempposz;
        
GetPlayerPos(playeridoldposxoldposyoldposz);
        
tempposx = (oldposx -x);
        
tempposy = (oldposy -y);
        
tempposz = (oldposz -z);
        
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
        
if (((tempposx radi) && (tempposx > -radi)) && ((tempposy radi) && (tempposy > -radi)) && ((tempposz radi) && (tempposz > -radi)))
        {
            return 
true;
        }
    }
    return 
0;

Mas aconselho vocк trocar todas elas por IsPlayerInRangeOfPoint(Nгo hб diferenca porem uma ja e nativa do samp por isto aconselho ela )
Entгo devo trocar "PlayerToPoint" por "IsPlayerInRangeOfPoint" em todo?
Reply
#4

Nгo й obrigatуrio, mas como eu disse IsPlayerInRangeOfPoint й padrгo do samp ae eu prefiro usar ela, mas nгo tem nenhum problme usar PlayerToPoint
Reply
#5

Quote:
Originally Posted by DayvisonJJB
Посмотреть сообщение
Nгo й obrigatуrio, mas como eu disse IsPlayerInRangeOfPoint й padrгo do samp ae eu prefiro usar ela, mas nгo tem nenhum problme usar PlayerToPoint
Como mas para sustituir й trocar tudo o que estб em PlayerToPoint por IsPlayerInRangeOfPoint.

somente isso ou add o codigo acima?
Reply
#6

Quote:
Originally Posted by Ivan_Mota
Посмотреть сообщение
Como mas para sustituir й trocar tudo o que estб em PlayerToPoint por IsPlayerInRangeOfPoint.

somente isso ou add o codigo acima?
Ivan, sou noob em Pawn, mas vou tentar te explicar a vantagem de usar a funзгo "IsPlayerInRangeOfPoint".

No meu caso, o comando para "Oficinas" (GM de Truck) selecionava as oficinas dessa forma:

PHP код:

//defines no topo da include
#define Oficina1 (-47.7836, 270.6917, 2.2500) // Apenas exemplos
#define Oficina2 (24.6492, 2418.9697, 22.7578)//
//No comando ficava assim
// (...) inicio do comando
if (Oficina1 || Oficina2)
//(...)restante do comando 
Ou seja, pra cada nova oficina que eu quisesse adicionar teria que definir no topo da include as coordenadas, e depois adicionar no comando como "Oficina1 || Oficina2 || Oficina3" e assim por diante.

Com a "IsPlayerInRangeOfPoint" sendo nativa do Samp vc nгo precisa "criб-la", e dб pra trabalhar de outra forma, vc pode definir as coordenadas atravйs de Floats, e chama-las no comando utilizando a funзгo nativa.

Por exemplo:

PHP код:
if(IsPlayerInRangeOfPoint(playerid10.0AOficinaPickups[i][tx], AOficinaPickups[i][ty], AOficinaPickups[i][tz])) 
Trabalhando dessa forma no comando, seu unico trabalho seria definir novas coordenadas depois, sem sequer alterar o comando, e qualquer coordenada adicionada jб seria reconhecida pelo comando.

Dб uma olhada nesse topico que fiz, eu tinha duvidas quanto a isso, e consegui resolver, talvez vc entenda melhor.

https://sampforum.blast.hk/showthread.php?tid=505541
Reply
#7

Quote:

Ou seja vocк deveria fazer isto para concertar:
PHP код:
public PlayerToPoint(Float:radiplayeridFloat:xFloat:yFloat:z)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
Float:oldposxFloat:oldposyFloat:oldposz;
        new 
Float:tempposxFloat:tempposyFloat:tempposz;
        
GetPlayerPos(playeridoldposxoldposyoldposz);
        
tempposx = (oldposx -x);
        
tempposy = (oldposy -y);
        
tempposz = (oldposz -z);
        
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
        
if (((tempposx radi) && (tempposx > -radi)) && ((tempposy radi) && (tempposy > -radi)) && ((tempposz radi) && (tempposz > -radi)))
        {
            return 
true;
        }
    }
    return 
0;

Coloquei mas continua igual.
Reply
#8

Quote:
Originally Posted by Ivan_Mota
Посмотреть сообщение
Coloquei mas continua igual.
Coloca isso no topo do seu gamemode e seja feliz:

Код:
#define PlayerToPoint(%0, %1, %2, %3, %4) IsPlayerInRangeOfPoint(%1, %0, %2, %3, %4)
Reply
#9

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
Coloca isso no topo do seu gamemode e seja feliz:

Код:
#define PlayerToPoint(%0, %1, %2, %3, %4) IsPlayerInRangeOfPoint(%1, %0, %2, %3, %4)
Deu isto.

Код:
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrec
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : error: 010: invalid function or declaration
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrec
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 236: unknown parameter in substitution (incorrect #define pattern)
F:\------------------------\gamemodes\Final.pwn(3692) : error: 029: invalid expression, assumed zero
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 215: expression has no effect
F:\------------------------\gamemodes\Final.pwn(3692) : error: 029: invalid expression, assumed zero
F:\------------------------\gamemodes\Final.pwn(3692) : warning: 215: expression has no effect
F:\------------------------\gamemodes\Final.pwn(3692) : error: 029: invalid expression, assumed zero
F:\------------------------\gamemodes\Final.pwn(3692) : error fatal: 107: too many error messages on one line
Reply
#10

retira
a forward e a public da funcao PlayerToPoint
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)