SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 08/08/2009, 03:57 PM   #1
PKRanger
Little Clucker
 
Join Date: Jul 2009
Posts: 19
Reputation: 0
Default warning 219: local variable "timecounter" shadows a variable at a preceding leve

error :
\gamemodes\drp.pwn(6 : warning 219: local variable "timecounter" shadows a variable at a preceding level

- TimeCounter is forwarded on top
- For all the strings/constants are new blabla ontop.
Code:
public TimeCounter(playerid, timecounter[])
{
	if (currentstate[playerid] == 0)
	{
	  // beaten time challange!
	  timechallange = timecounter[playerid];
	  KillTimer(timecountertimer[playerid]);
   	timecounter[playerid] = 0;
   	racecheckpoint[playerid] = 0;
   	currentstate[playerid] = 0;
   	return 1;
	  
	}
	else if(timecounter[playerid] > timechallange)
	{
		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
	{
   new str[128];
   format(str, sizeof str, "~b~ %d", timecounter[playerid]);
   GameTextForAll(str, 500, 5);
   timecountertimer[playerid] = SetTimer("TimeCounter", 1000, 0);
   timecounter[playerid]++;
	}
	return 1;
}
What does this exacly meens ?

Somehow i have some issues with this countup function when several people are joining it
PKRanger is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
(19879) : warning 219: local variable "mod" shadows a variable at a preceding le ReactionGameServers Help Archive 4 02/03/2010 09:23 PM
[Solved] Shadows variable at preceding level? bajskorv123 Help Archive 2 06/01/2010 11:14 AM
local variable "KillsName" shadows a variable at a preceding level (weird) ғαιιοцт Help Archive 40 14/10/2009 07:04 PM
[Help]error 033: array must be indexed (variable "teleport") borisblat Help Archive 1 13/10/2009 02:51 PM
local variable "tmp2" shadows a variable at a preceding level Battlaman Help Archive 2 04/08/2009 06:10 PM


All times are GMT. The time now is 08:13 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.