SA-MP Forums Archive
I cant fix these warning :S - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I cant fix these warning :S (/showthread.php?tid=92396)



I cant fix these warning :S - Taz86 - 19.08.2009

Hello all!

Ive set this:

pawn Код:
new string [256];
new pName[MAX_PLAYER_NAME];

And I get this :S :

pawn Код:
C:\Documents and Settings\Administrator\щемзп дтбегд\$CES$\gamemodes\CES.pwn(177) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\щемзп дтбегд\$CES$\gamemodes\CES.pwn(178) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\щемзп дтбегд\$CES$\gamemodes\CES.pwn(187) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\щемзп дтбегд\$CES$\gamemodes\CES.pwn(187) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Warnings.

Why?


Re: I cant fix these warning :S - Redgie - 19.08.2009

You have already declared those variables on a global scale, try giving them slightly alternative names.


Re: I cant fix these warning :S - Taz86 - 19.08.2009

What you mean?

How?


Re: I cant fix these warning :S - Amit_B - 19.08.2009

These variables already exists.
Remove these lines or rename the variables.


Re: I cant fix these warning :S - Taz86 - 19.08.2009

Ok, It cant be there twice I just adde it, What to rename it?


Re: I cant fix these warning :S - Redgie - 19.08.2009

Anything you like


Re: I cant fix these warning :S - Taz86 - 19.08.2009

But I cant Coz, Its asked me to define the pName, So I did it, How to rename it than?, It will ask again.


Re: I cant fix these warning :S - Amit_B - 19.08.2009

Quote:
Originally Posted by Taz86
Ok, It cant be there twice I just adde it, What to rename it?
What does it matter? just rename it to other variable name.
Hebrew - pashut teshane et hashemot shel hamishtanim, veze yetukan


Re: I cant fix these warning :S - Taz86 - 19.08.2009

Like here: Im deleting it :


pawn Код:
C:\Documents and Settings\Administrator\щемзп дтбегд\$CES$\gamemodes\CES.pwn(359) : error 017: undefined symbol "pName"
C:\Documents and Settings\Administrator\щемзп дтбегд\$CES$\gamemodes\CES.pwn(359) : error 017: undefined symbol "pName"
C:\Documents and Settings\Administrator\щемзп дтбегд\$CES$\gamemodes\CES.pwn(359) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\щемзп дтбегд\$CES$\gamemodes\CES.pwn(359) : fatal error 107: too many error messages on one line

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


4 Errors.



Re: I cant fix these warning :S - Taz86 - 19.08.2009

It wants me to define the NAME PName, So I didnt understand how I can rename them?