Help me in Fixing some warnings...
#1

Код:
D:\Danish\Zombie Gamemode\pawno\include\YSI\y_va/impl.inc(568) : warning 219: local variable "time" shadows a variable at a preceding level
D:\Danish\Zombie Gamemode\pawno\include\YSI\y_va/impl.inc(573) : warning 219: local variable "time" shadows a variable at a preceding level
D:\Danish\Zombie Gamemode\pawno\include\YSI\y_hooks/impl.inc(2626) : warning 219: local variable "time" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
when i compiled gamemode i found these warning s can anyone help me how can i fix it?
Reply
#2

You have a global variable "time" in your script.

You made it like this:

PHP код:
new time//maybe looks like this...or new time[12]; ...or new Text:time; ..this
//Now replace the new and write:
static time
Then the Warnings disappear..or just rename the variable
Reply
#3

Changing something from a 'new' to 'static' won't change anything.
Static simply means it's only used by this file and can't be shared or altered by others.

You need to increase the variable.
If you have, new Time[10]; Try doing new Time[11]; etc. Until you find the right one.
However, don't go over what you need either.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)