[Ajuda] 9 Warnings [Urgente]
#1

Bem Galera o problema e o Seguinte eu baixei o gm BPG e ele veio com 9 Warnings,e estou pedindo ajuda de voces aqui porque nao sei a causa do Warnings.

pawn Код:
C:\Users\Cliente\Desktop\Brasil Planet Games 3.0\Brasil Planet Games 3.0\Brasil Planet Games 3.0\gamemodes\bsp.pwn(45) : warning 201: redefinition of constant/macro (symbol "SPECIAL_ACTION_CUFFED")
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(16462) : warning 202: number of arguments does not match definition
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(23292) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(25150) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(44467) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(62281) : warning 219: local variable "xx" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(62281) : warning 219: local variable "yy" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(62281) : warning 219: local variable "zz" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(63407) : warning 209: function "OnPlayerKeyStateChange" should return a value
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

Header size:          13136 bytes
Code size:          2959560 bytes
Data size:          5960312 bytes
Stack/heap size:      16384 bytes; estimated max. usage=7945 cells (31780 bytes)
Total requirements: 8949392 bytes

9 Warnings.


pawn Код:
C:\Users\Cliente\Desktop\Brasil Planet Games 3.0\Brasil Planet Games 3.0\Brasil Planet Games 3.0\gamemodes\bsp.pwn(45) : warning 201: redefinition of constant/macro (symbol "SPECIAL_ACTION_CUFFED")
:

linha:

pawn Код:
#define SPECIAL_ACTION_CUFFED 4
pawn Код:
C:\Users\Cliente\Desktop\Brasil Planet Games 3.0\Brasil Planet Games 3.0\Brasil Planet Games 3.0\gamemodes\bsp.pwn(16462) : warning 202: number of arguments does not match definition
Linha:

pawn Код:
Create3DTextLabel("Disfarзe Bope Digite /dbope",VERDE2,311.4596,-1514.4111,24.9219,232.1320,0,0,0);
pawn Код:
C:\Users\Cliente\Desktop\Brasil Planet Games 3.0\Brasil Planet Games 3.0\Brasil Planet Games 3.0\gamemodes\bsp.pwn(23292) : warning 219: local variable "Nome" shadows a variable at a preceding level
Linha:

pawn Код:
new Nome[MAX_PLAYER_NAME];
pawn Код:
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(25150) : warning 219: local variable "string" shadows a variable at a preceding level
Linha:

pawn Код:
new name[MAX_PLAYER_NAME], string[100];
pawn Код:
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(44467) : warning 219: local variable "Nome" shadows a variable at a preceding level
Linha:

pawn Код:
new Nome[MAX_PLAYER_NAME], Nome2[MAX_PLAYER_NAME];

pawn Код:
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(62281) : warning 219: local variable "xx" shadows a variable at a preceding level
Linha:

pawn Код:
stock AddFlitsPaal(playerid, modelid, Float:xx, Float:yy, Float:zz, radius, speed)

pawn Код:
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(62281) : warning 219: local variable "yy" shadows a variable at a preceding level
pawn Код:
stock AddFlitsPaal(playerid, modelid, Float:xx, Float:yy, Float:zz, radius, speed)

pawn Код:
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(62281) : warning 219: local variable "zz" shadows a variable at a preceding level
pawn Код:
stock AddFlitsPaal(playerid, modelid, Float:xx, Float:yy, Float:zz, radius, speed)

pawn Код:
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(63407) : warning 209: function "OnPlayerKeyStateChange" should return a value

pawn Код:
}

Porfavor me ajudem!
Reply
#2

pawn Код:
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(23292) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(25150) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(44467) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(62281) : warning 219: local variable "xx" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(62281) : warning 219: local variable "yy" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(62281) : warning 219: local variable "zz" shadows a variable at a preceding level
Variбveis jб definidas.

pawn Код:
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(16462) : warning 202: number of arguments does not match definition
Numero de argumentos da funзгo invбlidos

pawn Код:
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(63407) : warning 209: function "OnPlayerKeyStateChange" should return a value
OnPlayerKeyStateChange Necessita de um return ao final.

pawn Код:
C:\Users\Cliente\Desktop\Brasil Planet Games 3.0\Brasil Planet Games 3.0\Brasil Planet Games 3.0\gamemodes\bsp.pwn(45) : warning 201: redefinition of constant/macro (symbol "SPECIAL_ACTION_CUFFED")
Redefina a macro/funзгo ou atualiza as includes.
Reply
#3

Cara voce so explicuu tudo em portugues eu tinha resolvido 2 warning's
explica mais um poquin '-'
Reply
#4

Re-leia o que ele postou, acho que chegarб lб.
Reply
#5

Leia e faзa oq o Funeral disse...

So resolver isso, que vai funcionar e compilar certinho
Reply
#6

Bem conseguir resolver 4 Warnings mais os

pawn Код:
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(25150) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(44467) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(62281) : warning 219: local variable "xx" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(62281) : warning 219: local variable "yy" shadows a variable at a preceding level
C:\Users\Cliente\Desktop\BPG\BPG\BPG\gamemodes\bsp.pwn(62281) : warning 219: local variable "zz" shadows a variable at a preceding level
nao consegui '-'

vo posta as linhas

pawn Код:
Essa e a que da os Warnings: stock AddFlitsPaal(playerid, modelid, Float:xx, Float:yy, Float:zz, radius, speed)
{
    new fine[MAX_PLAYERS];
    new str[256];

    if(objectcreated!=maxobject)
    {
        CreateObject(modelid, xx, yy, zz, 0.0, 0.0, 10);
        objectcreated++;
    }
    if((distance1[playerid])>speed)
    {
        if(IsPlayerInCircle(playerid, xx, yy, radius)  && GetPlayerState(playerid)== PLAYER_STATE_DRIVER)
        {
            fine[playerid]=((distance1[playerid]*17/10)-speed);
            GivePlayerMoney(playerid, -1000);
            format(str,sizeof(str), "[- RADAR -] O Limite de velocidade й de %d KM/H Vocк Passou a %d KM/H e foi multado!",speed, distance1[playerid] ,fine[playerid]);
            SendClientMessage(playerid, 0xFF6A08AA, str);
            PlayerPlaySound(playerid, 1132, 0.0, 0.0, 0.0);
        }
    }
}
pawn Код:
if(strcmp(cmd, "/tirarbombas", true) == 0)
    {
        if(IsAEx(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /tirarbombas [id]");
                return 1;
            }
            linha:new Nome[MAX_PLAYER_NAME], Nome2[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Nome2, sizeof(Nome2));
            giveplayerid = ReturnUser(tmp);
            GetPlayerName(giveplayerid, Nome, sizeof(Nome));
            format(string, sizeof(string), "Vocк retirou as bombas do terrorista %s", Nome);
            SendClientMessage(playerid, COLOR_YELLOW, string);
            format(string, sizeof(string), "Oficial %s retirou suas bombas por 10 minutos", Nome2);
            SendClientMessage(giveplayerid, COLOR_YELLOW, string);
            format(string, sizeof(string), "%s retirou as bombas do terrorista %s", Nome2, Nome);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            SemBombas[giveplayerid] = 1;
            SetTimerEx("VoltarBombas", 600000, false, "i", giveplayerid);
            return 1;
        }
        return 1;
    }
pawn Код:
if(strcmp("/bdd", cmdtext, true, 10) == 0)
    {
        ResetPlayerWeapons(playerid);
        Linha:new name[MAX_PLAYER_NAME], string[100];
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "[Teletransporte] %s foi para o Bairro do Death Match(DM) (/bdd)", name );
        SendClientMessageToAll(COLOR_GRAD1, string);

            SetPlayerPos(playerid,1554.7645,-1246.8375,279.3455);
            SetPlayerInterior(playerid,0);
            ResetPlayerWeapons(playerid),GivePlayerWeapon(playerid,24,999),GivePlayerWeapon(playerid,31,999),SetPlayerHealth(playerid,100),SetPlayerArmour(playerid,100);
            SendClientMessage(playerid,COLOR_YELLOW,"Bem-Vindo ao Bairro do Death Match(DM)! (by .....)");

        return 1;
    }
Reply
#7

Ajudem Por Favor
Reply
#8

Cara й porque aquelas variбveis estгo no escopo global!

E isso nгo vai interferir na funcionalidade de seu script!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)