loose indentation and functions
#1

\gamemodes\drp.pwn(70) : warning 219: local variable "timecounter" shadows a variable at a preceding level
\gamemodes\drp.pwn(7 : warning 217: loose indentation


I have about 20 warnings with loose identation, so im trying to solve them..
but every attempt failed..

Код:
forward TimeCounter(playerid, timecounter[]); <-- is on top of the script

public TimeCounter(playerid, timecounter[]) <-- Line 70
{
	if (currentstate[playerid] == 0)
	{
	  // beaten time challange!
	  timechallange = timecounter[playerid];
	  KillTimer(timecountertimer[playerid]);
	}
  if(timecounter[playerid] > 99) <-- line 78
  {
   GameTextForPlayer(playerid,"~g~ You failed to beat the time challange!", 5000, 5);
   KillTimer(timecountertimer[playerid]);
What does the warning exacly meen ? and what are the best way's to solve them ?

thnx,

PKR

Edit:

Код:
forward TimeCounter(playerid, timecounter[]); <-- is on top of the script
public TimeCounter(playerid)

{
	if (currentstate[playerid] == 0)
	{
	  // beaten time challange!
	  timechallange = timecounter[playerid];
	  KillTimer(timecountertimer[playerid]);
	}
  if(timecounter[playerid] > 99)
  {
   GameTextForPlayer(playerid,"~g~ You failed to beat the time challange!", 5000, 5);
   KillTimer(timecountertimer[playerid]);
   timecounter[playerid] = 0;
   racecheckpoint[playerid] = 0;
   currentstate[playerid] = 0;
   return 1;
  }
  else
This way i used to use, is the warning at line 70 gone, but on line 78 is still there.
I have some issues with the script, i suspect they are caused by those little warnings
Reply


Messages In This Thread
loose indentation and functions - by PKRanger - 08.08.2009, 15:12
Re: loose indentation and functions - by Sergei - 08.08.2009, 15:15
Re: loose indentation and functions - by PKRanger - 08.08.2009, 15:17
Re: loose indentation and functions - by Sergei - 08.08.2009, 15:29

Forum Jump:


Users browsing this thread: 1 Guest(s)