local variable "time" Help!!! +REP
#1

Ok So Here's The Warnings...
I know errors are more important, but pls help me out with this...

Код:
C:\Users\CopKing\Desktop\MA ASS\pawno\include\YSI\y_va/impl.inc(568) : warning 219: local variable "time" shadows a variable at a preceding level
C:\Users\CopKing\Desktop\MA ASS\pawno\include\YSI\y_va/impl.inc(573) : warning 219: local variable "time" shadows a variable at a preceding level
C:\Users\CopKing\Desktop\MA ASS\pawno\include\YSI\y_hooks/impl.inc(2624) : warning 219: local variable "time" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
Код:
if(Map[EvacType] == 2)
	    {
			SetPlayerPos(playerid,3024.4983,447.9744,14.7813);
			SetPlayerInterior(playerid,0);
Line 568---------->format(string,sizeof(string), ""chat""COL_LIGHTBLUE" %s made it to the water evacuation point and has received 1 coin!",PlayerName(playerid)); 
			SendClientMessageToAll(-1,string);
			DisablePlayerCheckpoint(playerid);
			CurePlayer(playerid);
			GivePlayerXP(playerid,50);
			pInfo[playerid][pEvac]++; <------------ Line 573
			pInfo[playerid][pCoins]++;
			SetPlayerColor(playerid,COLOR_YELLOW);
		}
__________________________________________________ _____
Код:
if(PRESSED(KEY_WALK))
	{
	    if(team[playerid] == TEAM_ZOMBIE)
Line 2624    {
			if(pInfo[playerid][pZombieClass] == SCREAMERZOMBIE)
			{
			    if(gettime() - 9 < Abilitys[playerid][ScreamerZombieAb]) return GameTextForPlayer(playerid,"~w~ Still recovering",1000,5);
			    {
					foreach(Player,i)
					{
          				switch(GetPlayerSkin(i))
     					{
     					    case NON_IMMUNE,285:
							{
Reply
#2

Those errors come from other file, but are caused by your gamemode. Do you have global variable named "time"? If yes, find and replace all occurances of it in your script. https://github.com/Y-Less/YSI-Includ.../impl.inc#L578 y_va in YSI 3.1 apparently reserves that name.
Reply
#3

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Those errors come from other file, but are caused by your gamemode. Do you have global variable named "time"? If yes, find and replace all occurances of it in your script. https://github.com/Y-Less/YSI-Includ.../impl.inc#L578 y_va in YSI 3.1 apparently reserves that name.
I dont understand what you said lol...!!
which file is causing this, and no i dont have a global variable named "time"
Reply
#4

I think, the variable with name "time" is used in that include you're using.

Just search for the variable "time" in your script and change the name of variable to something else.
Reply
#5

Tamy, i change time to what??

any examples?
Reply
#6

time1, Time, timE, whatever you want.
Reply
#7

nope still im getting warnings
Reply
#8

Common practice is to prefix global variables with 'g'. However, globals should be avoided wherever possible. If a variable is only used in one function, but it needs to retain its value between calls then use a static local.
Reply
#9

Ok whenever i search for time it shows these....
and when i changed TIME to time2 or timE .. it gives error

Код:
// Defines
#define function%0(%1) forward%0(%1);public%0(%1)
#define NON_IMMUNE 69,14,261,2,107,11,125,6,299,43,124,12,13,280,230,274,27,25,95,260,149,29,161,76,23,115,287,67,200
#define MAX_MAPTIME 250
#define MAX_RESTART_TIME 10000
#define MAX_MAPUPDATE_TIME 1450
#define MAX_SHOW_CP_TIME 1000
#define MAX_END_TIME 60000
#define MAX_BALANCERUPDATE_TIME 6000
#define MAX_MAP_FILES 19
#define SCM SendClientMessage
#define SCMTA SendClientMessageToAll
Reply
#10

You know what? Maybe your GM is fine. Maybe your includes are badly written and just the "time" variable inside them is causing the problem. Try taking a look at those lines in the specified includes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)