SA-MP Forums Archive
Warnings xXx - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Warnings xXx (/showthread.php?tid=280628)



Warnings xXx - Salsa - 02.09.2011

Help Me Please I Have These Warnings----- How I Fix It

Quote:

C:\Documents and Settings\Kapil\Desktop\samp03\samp03\gamemodes\lvd m.pwn(11 : warning 201: redefinition of constant/macro (symbol "COLOR_RED")
C:\Documents and Settings\Kapil\Desktop\samp03\samp03\gamemodes\lvd m.pwn(954) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase




Re: Warnings xXx - Jafet_Macario - 02.09.2011

You have defined 2 times COLOR_RED, so delete one.For the another one, show us the code, you returned somewhere too quickly.


Re: Warnings xXx - Salsa - 02.09.2011

Yea One Warning Fixed I Remove COLOR_RED Difined and And Its Fix

Now 2nd Warning

C:\Documents and Settings\Kapil\Desktop\samp03\samp03\gamemodes\lvd m.pwn(953) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

There is a warning in my Command

Quote:

if(strcmp(cmd, "/gangcommands", true) == 0)
{
new xd[768];
new message[] = "\t\t\t\t\t\t SampEver Party Server Gang Commands \n\n\n\n\n\n 1- To Create A New Gang Use : /gang create [name]\n\n 2- To Invite Someone To Your Gang Use : /gang invite [playerID].";
new message2[] = "\n\n 3- To Join Any Gang Use : /gang join.\n\n 4- To See Your Gang Stats Use : /ganginfo [number] {Note : no number given shows your gang's info } \n\n 5- To Check Your Gang Money Use : /gbank [money] , /gwithdraw [money] ,/gbalance ";
format(xd, sizeof(xd),"%s %s",message,message2);
ShowPlayerDialog(playerid, 1244, DIALOG_STYLE_MSGBOX, "SampEver Party Server Gangs Commands", xd, "Okay", "");
return 1;
}




Re: Warnings xXx - Wesley221 - 02.09.2011

Show us the code where its happening. Not just the line, but the lines above aswell.


Re: Warnings xXx - Salsa - 02.09.2011

See Up


Re: Warnings xXx - Wesley221 - 02.09.2011

pawn Code:
if(strcmp(cmd, "/gangcommands", true) == 0)
{
    ShowPlayerDialog(playerid, 1244, DIALOG_STYLE_MSGBOX, "SampEver Party Server Gangs Commands", \t\t\t\t\t\t SampEver Party Server Gang Commands \n\n\n\n\n\n 1- To Create A New Gang Use : /gang create [name]\n\n 2- To Invite Someone To Your Gang Use : /gang invite [playerID]. \n\n 3- To Join Any Gang Use : /gang join.\n\n 4- To See Your Gang Stats Use : /ganginfo [number] {Note : no number given shows your gang's info } \n\n 5- To Check Your Gang Money Use : /gbank [money] , /gwithdraw [money] ,/gbalance , "Okay", "");
    return 1;
}
Just do it like that, the variables arent really needed, since youre not using placeholders (%s, %i, etc).


Re: Warnings xXx - emokidx - 02.09.2011

EDIT: nvm


Re: Warnings xXx - Salsa - 02.09.2011

isnt Fix It Shownig 5 Errors


Re: Warnings xXx - [MWR]Blood - 02.09.2011

pawn Code:
if(strcmp(cmd, "/gangcommands", true) == 0)
{
    new string[768];
    format(string,sizeof(string),"\t\t\t\t\t\t SampEver Party Server Gang Commands \n\n\n\n\n\n 1- To Create A New Gang Use : /gang create [name]\n\n 2- To Invite Someone To Your Gang Use : /gang invite [playerID] \n\n");
    strcat(string,"3- To Join Any Gang Use : /gang join.\n\n 4- To See Your Gang Stats Use : /ganginfo [number] {Note : no number given shows your gang's info } \n\n 5- To Check Your Gang Money Use : /gbank [money] , /gwithdraw [money] ,/gbalance");
    ShowPlayerDialog(playerid, 1244, DIALOG_STYLE_MSGBOX, "SampEver Party Server Gangs Commands", string, "Okay", "");
    return 1;
}



Re: Warnings xXx - Salsa - 02.09.2011

IT SHOWING THIS


Quote:

C:\Documents and Settings\Kapil\Desktop\samp03\samp03\gamemodes\lvd m.pwn(953) : warning 225: unreachable code
C:\Documents and Settings\Kapil\Desktop\samp03\samp03\gamemodes\lvd m.pwn(955) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size: 4884 bytes
Code size: 879928 bytes
Data size: 222536 bytes
Stack/heap size: 16384 bytes; estimated max. usage=5154 cells (20616 bytes)
Total requirements: 1123732 bytes

2 Warnings.