27.07.2015, 01:16
PHP код:
(22979) : warning 219: local variable "string" shadows a variable at a preceding level
(22990) : warning 219: local variable "string" shadows a variable at a preceding level
(23001) : warning 219: local variable "string" shadows a variable at a preceding level
(23012) : warning 219: local variable "string" shadows a variable at a preceding level
(23025) : warning 219: local variable "string" shadows a variable at a preceding level
(23054) : warning 219: local variable "string" shadows a variable at a preceding level
(23065) : warning 219: local variable "string" shadows a variable at a preceding level
(23076) : warning 219: local variable "string" shadows a variable at a preceding level
(23087) : warning 219: local variable "string" shadows a variable at a preceding level
(23098) : warning 219: local variable "string" shadows a variable at a preceding level
(23111) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
11 Warnings.
PHP код:
if(dialogid == 1)
{
new donate;
new file = ini_openFile("donate.ini");
if(ini_getInteger(file, inputtext, donate) == 0)
{
//LEVELS
if(donate == 1)
{
new string[100];
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
dUserSetINT(PlayerName2(playerid)).("level",(donate));
PlayerInfo[playerid][Level] = donate;
format(string,sizeof(string),"[DONATE] %s Level %d on %d/%d/%d at %d:%d:%d", PlayerName2(playerid), donate, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
SaveToFile("donationscodes",string);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
if(donate == 2)
{
new string[100];
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
dUserSetINT(PlayerName2(playerid)).("level",(donate));
PlayerInfo[playerid][Level] = donate;
format(string,sizeof(string),"[DONATE] %s Level %d on %d/%d/%d at %d:%d:%d", PlayerName2(playerid), donate, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
SaveToFile("donationscodes",string);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
if(donate == 3)
{
new string[100];
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
dUserSetINT(PlayerName2(playerid)).("level",(donate));
PlayerInfo[playerid][Level] = donate;
format(string,sizeof(string),"[DONATE] %s Level %d on %d/%d/%d at %d:%d:%d", PlayerName2(playerid), donate, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
SaveToFile("donationscodes",string);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
if(donate == 4)
{
new string[100];
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
dUserSetINT(PlayerName2(playerid)).("level",(donate));
PlayerInfo[playerid][Level] = donate;
format(string,sizeof(string),"[DONATE] %s Level %d on %d/%d/%d at %d:%d:%d", PlayerName2(playerid), donate, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
SaveToFile("donationscodes",string);
PlayerInfo[playerid][bank] = PlayerInfo[playerid][bank]+50000000;
SavePlayer(playerid);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
if(donate == 5)
{
new string[100];
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
dUserSetINT(PlayerName2(playerid)).("level",(donate));
PlayerInfo[playerid][Level] = donate;
format(string,sizeof(string),"[DONATE] %s Level %d on %d/%d/%d at %d:%d:%d", PlayerName2(playerid), donate, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
SaveToFile("donationscodes",string);
PlayerInfo[playerid][bank] = PlayerInfo[playerid][bank]+50000000;
SavePlayer(playerid);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
ini_removeKey(file,inputtext);
}
else
{
SendClientMessage(playerid, red,"ERROR: Wrong Donate Code (Levels)");
}
ini_closeFile(file);
return 1;
}
if(dialogid == 2)
{
new donate;
new file = ini_openFile("donatevip.ini");
if(ini_getInteger(file, inputtext, donate) == 0)
{
if(donate == 1)
{
new string[100];
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
dUserSetINT(PlayerName2(playerid)).("vip",(donate));
PlayerInfo[playerid][vip] = donate;
format(string,sizeof(string),"[DONATE] %s VIP Level %d on %d/%d/%d at %d:%d:%d", PlayerName2(playerid), donate, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
SaveToFile("donationscodes",string);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
if(donate == 2)
{
new string[100];
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
dUserSetINT(PlayerName2(playerid)).("vip",(donate));
PlayerInfo[playerid][vip] = donate;
format(string,sizeof(string),"[DONATE] %s VIP Level %d on %d/%d/%d at %d:%d:%d", PlayerName2(playerid), donate, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
SaveToFile("donationscodes",string);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
if(donate == 3)
{
new string[100];
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
dUserSetINT(PlayerName2(playerid)).("vip",(donate));
PlayerInfo[playerid][vip] = donate;
format(string,sizeof(string),"[DONATE] %s VIP Level %d on %d/%d/%d at %d:%d:%d", PlayerName2(playerid), donate, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
SaveToFile("donationscodes",string);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
if(donate == 4)
{
new string[100];
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
dUserSetINT(PlayerName2(playerid)).("vip",(donate));
PlayerInfo[playerid][vip] = donate;
SaveToFile("donationscodes",string);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
if(donate == 5)
{
new string[100];
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
dUserSetINT(PlayerName2(playerid)).("vip",(donate));
PlayerInfo[playerid][vip] = donate;
format(string,sizeof(string),"[DONATE] %s VIP Level %d on %d/%d/%d at %d:%d:%d", PlayerName2(playerid), donate, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
SaveToFile("donationscodes",string);
PlayerInfo[playerid][bank] = PlayerInfo[playerid][bank]+50000000;
SavePlayer(playerid);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
if(donate == 6)
{
new string[100];
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
dUserSetINT(PlayerName2(playerid)).("vip",(donate));
PlayerInfo[playerid][vip] = donate;
format(string,sizeof(string),"[DONATE] %s VIP Level %d on %d/%d/%d at %d:%d:%d", PlayerName2(playerid), donate, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
SaveToFile("donationscodes",string);
PlayerInfo[playerid][bank] = PlayerInfo[playerid][bank]+50000000;
SavePlayer(playerid);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
return 1;
}
ini_removeKey(file,inputtext);
}
else
{
SendClientMessage(playerid, red,"ERROR: Wrong Donate Code (VIPs)");
}
ini_closeFile(file);
return 1;
}
Код:
lines error: all : new string[100];