9 Warnings - Could you help me? Thanks.
#1

pawn Код:
D:\country gamemode\samp03dsvr_RC2_win32\gamemodes\elitedrift.pwn(1372) : warning 219: local variable "string" shadows a variable at a preceding level
D:\country gamemode\samp03dsvr_RC2_win32\gamemodes\elitedrift.pwn(1389) : warning 219: local variable "string" shadows a variable at a preceding level
D:\country gamemode\samp03dsvr_RC2_win32\gamemodes\elitedrift.pwn(1437) : warning 219: local variable "string" shadows a variable at a preceding level
D:\country gamemode\samp03dsvr_RC2_win32\gamemodes\elitedrift.pwn(2641) : warning 219: local variable "string" shadows a variable at a preceding level
D:\country gamemode\samp03dsvr_RC2_win32\gamemodes\elitedrift.pwn(2673) : warning 219: local variable "string" shadows a variable at a preceding level
D:\country gamemode\samp03dsvr_RC2_win32\gamemodes\elitedrift.pwn(2695) : warning 219: local variable "string" shadows a variable at a preceding level
D:\country gamemode\samp03dsvr_RC2_win32\gamemodes\elitedrift.pwn(2711) : warning 219: local variable "string" shadows a variable at a preceding level
D:\country gamemode\samp03dsvr_RC2_win32\gamemodes\elitedrift.pwn(3086) : warning 219: local variable "string" shadows a variable at a preceding level
D:\country gamemode\samp03dsvr_RC2_win32\gamemodes\elitedrift.pwn(3092) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


9 Warnings.
Reply
#2

You did this, for example:

pawn Код:
new string[128];
for(new i = 0; i < 500; i++ )
{
    new string[128];
}
No need to define it twice!
Reply
#3

Код:
Line 1372:     new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
Line 1389:    new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
Line 1437: 	new string[256];
Line 2641:						        string[128],
Line 2673:			                       string[128]
2695:					string[128]
2711: 				new string[256],year,month,day,hours,minutes,seconds;
3086:		        new string[250];
3092:		        new string[300];
Reply
#4

If you already defined 'string' above, you should delete new string. (in the lines where it gives warning).
Reply
#5

Oh, LOL. Thank you mate 1 rep +
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)