SA-MP Forums Archive
[Ajuda] Warnings teimosos. :( - 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] Warnings teimosos. :( (/showthread.php?tid=415843)



Warnings teimosos. :( - NuTShoT - 14.02.2013

Alguйm me ajuda com estes warnings ?!

pawn Код:
Compilando BRA.pwn...

C:include\MSi\msi_radars.inc(366) : warning 209: function "GMInit" should return a value

C:\BLS.pwn(24) : warning 201: redefinition of constant/macro (symbol "MAX_RADARS")

C:\BLS.pwn(2665) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(17077) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(17132) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(17144) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(17156) : warning 219: local variable "X" shadows a variable at a preceding level
C:\BLS.pwn(17168) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(17180) : warning 219: local variable "X" shadows a variable at a preceding level
C:\BLS.pwn(17192) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(27491) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(27954) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(28351) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(28444) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(31837) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(42581) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(56698) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(60741) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(60780) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(60947) : warning 219: local variable "X" shadows a variable at a preceding level

C:\BLS.pwn(61042) : warning 219: local variable "X" shadows a variable at a preceding level

Pawn compiler 3.2.3664                          Copyright (c) 1997-2006, ITB CompuPhase

Header size:          14048 bytes
Code size:          3075504 bytes
Data size:         11909652 bytes
Stack/heap size:      16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements:15015588 bytes

21 Warnings.
Aqui o exemplo da linha 2665
pawn Код:
new Float:PX,Float:PY,Float:PZ,Float:X,Float:Y,Float:Z;GetPlayerPos(playerid,PX,PY,PZ);GetVehiclePos(vehicleid, X,Y,Z);new Float:Distance = (X-PX)*(X-PX)+(Y-PY)*(Y-PY)+(Z-PZ)*(Z-PZ);if(Distance <= radi*radi) {
Vlw!


Re: Warnings teimosos. :( - sofina - 15.02.2013

Acho que vocк arrumando aqiele primeiro erro vocк arruma todas.


Re: Warnings teimosos. :( - SonicPaintballer - 15.02.2013

C:include\MSi\msi_radars.inc(366) : warning 209: function "GMInit" should return a value
A funзao GMInit devia retornar um valor...

C:\BLS.pwn(24) : warning 201: redefinition of constant/macro (symbol "MAX_RADARS")
ja foi definido um MAX_RADARS ou seja...ta duplicado...


Re: Warnings teimosos. :( - NuTShoT - 15.02.2013

Olб o 1є erro e o 2є erro consegui concertar.

Agora como concerto o warning 219 ?!

Vlw!


Re: Warnings teimosos. :( - DouglasRodrigues - 15.02.2013

Vocк criou uma variavel (global) X sendo que a variavel X e X estб sendo criado novamente em comandos/funзхes, a soluзгo й mudar o nome desta variavel (X2) e alterar o nome igualmente onde ela estб sendo usada.


Re: Warnings teimosos. :( - NuTShoT - 15.02.2013

Essa variavel global pode ser na includa radars ?!


Se sim como posso muda-la ?


Re: Warnings teimosos. :( - smiiir - 15.02.2013

Retire todas as variaveis que vocк criou

PHP код:
new Float:X,Float:Y,Float:Z
e deixe a variavel global


Re: Warnings teimosos. :( - NuTShoT - 16.02.2013

Olб tava olhando a include radars achei isto:

pawn Код:
stock CreateRadar(Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ,
                Float:DrawDistance = 200.0, maxspeed = 140, Float:radius = 15.0,
                activated = true)
Serб que pode ser isto ?


Re: Warnings teimosos. :( - smiiir - 16.02.2013

Quote:
Originally Posted by NuTShoT
Посмотреть сообщение
Olб tava olhando a include radars achei isto:

pawn Код:
stock CreateRadar(Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ,
                Float:DrawDistance = 200.0, maxspeed = 140, Float:radius = 15.0,
                activated = true)
Serб que pode ser isto ?
Faz Isso:

Retire todas as variaveis
PHP код:
new Float:XFloat:YFloat:Z
e crie uma global
PHP код:
new Float:XFloat:YFloat:Z



Re: Warnings teimosos. :( - NuTShoT - 16.02.2013

Mas este problema nгo ocorria antes de eu adicionar a inlcude. Serб que nгo posso mecher sу na include ?!
Desculpas se nгo estou raciocinando ou escrevendo errado acabei de sair de uma cirurgia. :S

Vlw!