[Ajuda] Warnings teimosos. :(
#1

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!
Reply
#2

Acho que vocк arrumando aqiele primeiro erro vocк arruma todas.
Reply
#3

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...
Reply
#4

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

Agora como concerto o warning 219 ?!

Vlw!
Reply
#5

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.
Reply
#6

Essa variavel global pode ser na includa radars ?!


Se sim como posso muda-la ?
Reply
#7

Retire todas as variaveis que vocк criou

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

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 ?
Reply
#9

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
Reply
#10

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!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)