Warnings xXx
#1

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

Reply
#2

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

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;
}

Reply
#4

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

See Up
Reply
#6

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).
Reply
#7

EDIT: nvm
Reply
#8

isnt Fix It Shownig 5 Errors
Reply
#9

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;
}
Reply
#10

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.

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)