SA-MP Forums Archive
[Ajuda] Ajudar Waring - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ajudar Waring (/showthread.php?tid=484226)



Ajudar Waring - Dieguinho - 29.12.2013

Pessoal to tendo 3 waring ajudar ?

PHP код:
G:\Brasil Epic Games\gamemodes\BEG2.pwn(3942) : warning 213tag mismatch
G
:\Brasil Epic Games\gamemodes\BEG2.pwn(4004) : warning 202number of arguments does not match definition
G
:\Brasil Epic Games\gamemodes\BEG2.pwn(4016) : warning 202number of arguments does not match definition
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
3 Warnings

pawn Код:
stock PlaySoundForPlayersInRange(soundid, Float:x, Float:y, Float:z)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, range, x, y, z)) // linha  3942
        {
            PlayerPlaySound(i, soundid, x, y, z);
        }
    }
}

//LINHA 4004
PlaySoundForPlayersInRange(6401, 50.0, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid) + 5.0);

//LINHA 4016
PlaySoundForPlayersInRange(6401, 50.0, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid) + 5.0);



Re: Ajudar Waring - Tugamars - 29.12.2013

PlaySoundForPlayersInRange(6401, 50.0, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid) + 5.0); // 5 argumentos

stock PlaySoundForPlayersInRange(soundid, Float, Float:y, Float:z) // 4 argumentos , acho que й esse o problema


Re: Ajudar Waring - Dieguinho - 29.12.2013

Quote:
Originally Posted by Tugamars
Посмотреть сообщение
PlaySoundForPlayersInRange(6401, 50.0, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid) + 5.0); // 5 argumentos

stock PlaySoundForPlayersInRange(soundid, Float, Float:y, Float:z) // 4 argumentos , acho que й esse o problema
tinha mais 1 so que deu waning e mandou eu retirar a funзгo !


Re: Ajudar Waring - Juniiro3 - 29.12.2013

Troque:
stock PlaySoundForPlayersInRange(soundid, Float, Float:y, Float:z)
Por:
stock PlaySoundForPlayersInRange(soundid, Float:range, Float, Float:y, Float:z)

Faltava um argumento, como disse nosso amigo Tugamars.


Re: Ajudar Waring - PT - 29.12.2013

pawn Код:
stock PlaySoundForPlayersInRange(soundid, range, Float:x, Float:y, Float:z)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, range, x, y, z)) // linha  3942
        {
            PlayerPlaySound(i, soundid, x, y, z);
        }
    }
}



Re: Ajudar Waring - Dieguinho - 29.12.2013

Quote:
Originally Posted by PT
Посмотреть сообщение
pawn Код:
stock PlaySoundForPlayersInRange(soundid, range, Float:x, Float:y, Float:z)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, range, x, y, z)) // linha  3942
        {
            PlayerPlaySound(i, soundid, x, y, z);
        }
    }
}
PHP код:
G:\Brasil Epic Games\gamemodes\BEG2.pwn(3938) : warning 219local variable "range" shadows a variable at a preceding level
G
:\Brasil Epic Games\gamemodes\BEG2.pwn(3942) : warning 213tag mismatch
G
:\Brasil Epic Games\gamemodes\BEG2.pwn(3938) : warning 203symbol is never used"range"
G:\Brasil Epic Games\gamemodes\BEG2.pwn(4004) : warning 213tag mismatch
G
:\Brasil Epic Games\gamemodes\BEG2.pwn(4016) : warning 213tag mismatch
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
5 Warnings

agr ficou 5


Re: Ajudar Waring - Juniiro3 - 29.12.2013

Quote:
Originally Posted by PT
Посмотреть сообщение
pawn Код:
stock PlaySoundForPlayersInRange(soundid, range, Float:x, Float:y, Float:z)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, range, x, y, z)) // linha  3942
        {
            PlayerPlaySound(i, soundid, x, y, z);
        }
    }
}
range й uma float, nгo uma int


Re: Ajudar Waring - PT - 29.12.2013

Quote:
Originally Posted by Juniiro3
Посмотреть сообщение
range й uma float, nгo uma int
exato, nem tomei atencao..

pawn Код:
stock PlaySoundForPlayersInRange(soundid, Float:range, Float:x, Float:y, Float:z)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, range, x, y, z)) // linha  3942
        {
            PlayerPlaySound(i, soundid, x, y, z);
        }
    }
}
desculpa ae diego


Re: Ajudar Waring - Dieguinho - 29.12.2013

Quote:
Originally Posted by Juniiro3
Посмотреть сообщение
Troque:
stock PlaySoundForPlayersInRange(soundid, Float, Float:y, Float:z)
Por:
stock PlaySoundForPlayersInRange(soundid, Float:range, Float, Float:y, Float:z)

Faltava um argumento, como disse nosso amigo Tugamars.
ai man ficou assim

G:\Brasil Epic Games\gamemodes\BEG2.pwn(393 : warning 219: local variable "range" shadows a variable at a preceding level
G:\Brasil Epic Games\gamemodes\BEG2.pwn(3942) : warning 213: tag mismatch
G:\Brasil Epic Games\gamemodes\BEG2.pwn(393 : warning 203: symbol is never used: "range"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Warnings.


Re: Ajudar Waring - PT - 29.12.2013

pawn Код:
stock PlaySoundForPlayersInRange(soundid, Float:ptd, Float:x, Float:y, Float:z)
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, ptd, x, y, z)) // linha  3942
        {
            PlayerPlaySound(i, soundid, x, y, z);
        }
    }
}