Problem with 66 warnings. -
dundolina - 21.07.2012
Код:
D:\games\Скинове О.О\Orignalniq mod\Без гангове\REAL PAWNO\pawno\include\dutils.inc(299) : warning 219: local variable "i" shadows a variable at a preceding level
D:\games\Скинове О.О\Orignalniq mod\Без гангове\REAL PAWNO\pawno\include\dutils.inc(356) : warning 219: local variable "i" shadows a variable at a preceding level
D:\games\Скинове О.О\Orignalniq mod\Без гангове\REAL PAWNO\pawno\include\dutils.inc(465) : warning 219: local variable "i" shadows a variable at a preceding level
D:\games\Скинове О.О\Orignalniq mod\Без гангове\REAL PAWNO\pawno\include\JunkBuster.inc(115) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(1704) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(1718) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(1872) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(2294) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(2424) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(3259) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(3362) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(3381) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(3400) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(3419) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(3438) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(3457) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(3476) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(3495) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(4239) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(5131) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(5165) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(6215) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(6459) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(6493) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(6527) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(6541) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(6835) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(6865) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(7301) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(7327) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(7495) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(7707) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(8408) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(8477) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(8542) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(8561) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(8620) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(8705) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(8858) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(8900) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(9306) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(9332) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(9600) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(9623) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(9632) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(9646) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(9816) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(9862) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(9876) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(9903) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(9950) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(9989) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(10084) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(10094) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(10104) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(10114) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(10124) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(10134) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(10144) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(10154) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(10191) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(10237) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(10256) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(10413) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(10621) : warning 219: local variable "i" shadows a variable at a preceding level
C:\Users\ники\Desktop\gangwars.pwn(10647) : warning 203: symbol is never used: "vote"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
66 Warnings.
Wrong is here, so I guess
Код:
new i=0, pAns[MAX_ANSWERS];
Re: Problem with 66 warnings. -
Jikesh - 21.07.2012
i =0 is generally used for.. for loops.
You are getting so many warnings because you have defined i somewhere and then you have also used for(new i = 0; i < MAX_PLAYERS; i++) which means i is globally defined and then redefined in for loops.
Would be great if you can post more code from the new i=0, pAns[MAX_ANSWERS]; or are they globally defined?
I hope you understand what I meant to say.
Re: Problem with 66 warnings. -
dundolina - 21.07.2012
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case dVote:
{
if(!response) {vStart=0; return SendClientMessage(playerid,White,"You Canceled");}
format(Que,sizeof(Que),"%s",inputtext);
FrstAns=1;
return ShowPlayerDialog(playerid,dVote+1,DIALOG_STYLE_INPUT,"Answer","Answer 1:","Add","Cancel");
}
case dVote+1:
{
if(!response && FrstAns==1) {vStart=0; return SendClientMessage(playerid,White,"Vote Canceled.");}
if(!response || i==MAX_ANSWERS) return EndVote(playerid);
new answer[128],eAns[128];
format(answer,128,"Answer %d:",i+2);
if(FrstAns==1) format(eAns,128,"Answer 1: [ Can't Be EMPTY! ]");
else format(eAns,128,"Answer %d: [ Can't Be EMPTY! ]",i+1);
if(!strlen(inputtext))
if(FrstAns==1) return ShowPlayerDialog(playerid,dVote+1,DIALOG_STYLE_INPUT,"Answer was Empty!",eAns,"Add","Cancel");
else return ShowPlayerDialog(playerid,dVote+1,DIALOG_STYLE_INPUT,"Answer was Empty!",eAns,"Add","Start Vote");
format(Ans[i],128,"%s",inputtext);
i++;
if((i+1)>MAX_ANSWERS) return EndVote(playerid);
else FrstAns=0;
return ShowPlayerDialog(playerid,dVote+1,DIALOG_STYLE_INPUT,"Answer",answer,"Add","Start Vote");
}
case dVote+2:
{
if(!response) return SendClientMessage(playerid,White,"You Canceled");
for(new j=0;j<i;j++)
if(listitem==j)
pAns[j]++;
}
}
return 0;
}
CMD:vote(playerid,params[])
{
new cmd[24];
if(sscanf(params,"s[24]",cmd))
{
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,White,"/Vote Start - To Start a Vote.");
SendClientMessage(playerid,White,"/Vote End - To End a Vote.");
}
return SendClientMessage(playerid,White,"/Vote Ans - To Answer The Vote.");
}
if(!strcmp(cmd,"start",true))
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,White,"You Are Not and Admin!");
if(vStart==1) return SendClientMessage(playerid,White,"There is Vote Started");
vStart=1;
i=0;
return ShowPlayerDialog(playerid,dVote,DIALOG_STYLE_INPUT,"Choose the Question","The Question:","Ask","Cancel");
}
else if(!strcmp(cmd,"ans",true))
{
if(vStart==0) return SendClientMessage(playerid,White,"No Vote.");
if(IsVoted[playerid]==1) return SendClientMessage(playerid,White,"You Already Voted");
IsVoted[playerid]=1;
return ShowPlayerDialog(playerid,dVote+2,DIALOG_STYLE_LIST,Que,Sst,"Pick","Cancel");
}
else if(!strcmp(cmd,"end",true))
{
if(vStart==0) return SendClientMessage(playerid,White,"There is No Vote.");
return EndTime(playerid);
}
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,White,"/Vote Start - To Start a Vote.");
SendClientMessage(playerid,White,"/Vote End - To End a Vote.");
}
return SendClientMessage(playerid,White,"/Vote Ans - To Answer The Vote.");
Re: Problem with 66 warnings. -
dundolina - 21.07.2012
Help please?
Re: Problem with 66 warnings. -
dundolina - 22.07.2012
Please help me..100% of the problem is this line. I need to change something there to fix problems.
Код:
new i=0, pAns[MAX_ANSWERS];
Re: Problem with 66 warnings. -
dundolina - 22.07.2012
Come on help me,please.
Re: Problem with 66 warnings. -
[MM]RoXoR[FS] - 22.07.2012
This clearly shows that i is a global variable
Код:
if(!response || i==MAX_ANSWERS) return EndVote(playerid);
Anyways, dont care about your "i" warnings. Your GM will compile fine.
Re: Problem with 66 warnings. -
dundolina - 22.07.2012
I want to clean all the warnings. What you gave me does not work. Please emergency help..
Re: Problem with 66 warnings. -
dundolina - 22.07.2012
Help?