[Ajuda] ajudinha com esses warnings
#1

esse code pegava de boa em zcmd peguei do meu gm de drift pra coloca nesse novo q to montando
pawn Код:
bCMD[flip]-(playerid, params[])
{
    #pragma unused params
    new Float:X, Float:Y, Float:Z;
    if(IsPlayerInAnyVehicle(playerid))
    {
        SetCameraBehindPlayer(playerid);
        GetPlayerPos(playerid, X, Y, Z);
        SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
        SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);
    }
    return 1;
}
Код:
C:\Users\Villy\Desktop\iniciante\gamemodes\Freeroam.pwn(4759) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Users\Villy\Desktop\iniciante\gamemodes\Freeroam.pwn(4759) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Users\Villy\Desktop\iniciante\gamemodes\Freeroam.pwn(4759) : warning 219: local variable "Z" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
linha do erro: new Float:X, Float:Y, Float:Z;
Reply
#2

Troque por new Float:Xa, Float:Ya, Float: Za.

Pois o gamemode reconhece que jб existe definiзхes como esta.
Reply
#3

Retire o new Float, Float:y, Float:z
Reply
#4

Quote:
Originally Posted by Scripter Fodastico
Посмотреть сообщение
Troque por new Float:Xa, Float:Ya, Float: Za.

Pois o gamemode reconhece que jб existe definiзхes como esta.
mesmo erros eu ja tinha tentado kk
Quote:
Originally Posted by FeelLikeASir_
Посмотреть сообщение
Retire o new Float, Float:y, Float:z
valews deu certo
Reply
#5

LoooL Mano


Vocк esqueceu de Colocar as cordenadas no negoзo

Oxi ai vai da erro mesmo

Код:
bCMD[flip]-(playerid, params[])
{
    #pragma unused params
    new Float:X, Float:Y, Float:Z;
    if(IsPlayerInAnyVehicle(playerid))
    {
        SetCameraBehindPlayer(playerid);
        GetPlayerPos(playerid, X, Y, Z);// Aki no lugar de x,y,z voce coloca os numeros das cordenadas
        SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);// Aki no lugar de x,y,z voce coloca os numeros das cordenadas
        SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);
    }
    return 1;
}
Reply
#6

Quote:
Originally Posted by gabrielloko157
Посмотреть сообщение
LoooL Mano


Vocк esqueceu de Colocar as cordenadas no negoзo

Oxi ai vai da erro mesmo

Код:
bCMD[flip]-(playerid, params[])
{
    #pragma unused params
    new Float:X, Float:Y, Float:Z;
    if(IsPlayerInAnyVehicle(playerid))
    {
        SetCameraBehindPlayer(playerid);
        GetPlayerPos(playerid, X, Y, Z);// Aki no lugar de x,y,z voce coloca os numeros das cordenadas
        SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);// Aki no lugar de x,y,z voce coloca os numeros das cordenadas
        SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);
    }
    return 1;
}
Qual vocк fumo hoje?
Reply
#7

KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK'
Euri /\
Manow GETPLAYERPOS !
Vai pegar a posiзгo do jogar , nгo vai mandar ele pra x,y,z ://...
Reply
#8

Lol Nem Reparei sahuashsau


eu li setplayerpos

sem Zueira
Reply
#9

pawn Код:
bCMD[flip]-(playerid, params[])
{
    #pragma unused params  
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Tem q estar em um veiculo");
    new Float:pX, Float:pY, Float:pZ;
    if(IsPlayerInAnyVehicle(playerid))
    SetCameraBehindPlayer(playerid);
    GetPlayerPos(playerid, pX, pY, pZ);
    SetVehiclePos(GetPlayerVehicleID(playerid), pX, pY, pZ);
    SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);
    return 1;
}
Reply
#10

Quote:
Originally Posted by Bruno Alves
Посмотреть сообщение
pawn Код:
bCMD[flip]-(playerid, params[])
{
    #pragma unused params  
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Tem q estar em um veiculo");
    new Float:pX, Float:pY, Float:pZ;
    if(IsPlayerInAnyVehicle(playerid))
    SetCameraBehindPlayer(playerid);
    GetPlayerPos(playerid, pX, pY, pZ);
    SetVehiclePos(GetPlayerVehicleID(playerid), pX, pY, pZ);
    SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);
    return 1;
}
Nгo necessita do params[], sу fazer bCMD[flip]-(playerid)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)