SA-MP Forums Archive
FIXED: Thanks to EliranPesahov and _Alexander - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: FIXED: Thanks to EliranPesahov and _Alexander (/showthread.php?tid=269650)



FIXED: Thanks to EliranPesahov and _Alexander - Ehab1911 - 17.07.2011

Hello this warning keeps comin out:

pawn Код:
D:\SA-MP PROJECT\samp03csvr_R2-2_win32\gamemodes\New Version\project.pwn(2145) : warning 225: unreachable code
Hm I am gonna show you the lines:

pawn Код:
if(strcmp("/neon", cmdtext, true, 10) == 0)
                ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Add Neon to your Vehicle! Neon costs: 200$","1. Red Neon\r\n2. Blue Neon\r\n3. Green Neon\r\n4. Yellow Neon\r\n5. Pink Neon\r\n6. White Neon","OK", "CANCEL");
                return 0;
                if(!strcmp(cmdtext, "/grapple", true))
So after return 0; I didn't put a } because it will give me other 7 errors what should I do :S?


Re: A warning keeps coming - _Aleksandar - 17.07.2011

Код:
if(strcmp("/neon", cmdtext, true, 10) == 0)
{
 return  ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Add Neon to your Vehicle! Neon costs: 200$","1. Red Neon\r\n2. Blue Neon\r\n3. Green Neon\r\n4. Yellow Neon\r\n5. Pink Neon\r\n6. White Neon","OK", "CANCEL");
}
.
.
.
other commands


Re: A warning keeps coming - Toreno - 17.07.2011

BECAUSE you need to first open it!
pawn Код:
if(strcmp("/neon", cmdtext, true, 10) == 0) {
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Add Neon to your Vehicle! Neon costs: 200$","1. Red Neon\r\n2. Blue Neon\r\n3. Green Neon\r\n4. Yellow Neon\r\n5. Pink Neon\r\n6. White Neon","OK", "CANCEL");
    return 1;
}
if(!strcmp(cmdtext, "/grapple", true)) {
    // YOUR other command goes here...
    return 1;
}



Re: A warning keeps coming - Ehab1911 - 17.07.2011

EDIT: THANKS A LOT GUYS! IT WORKED!


Re: A warning keeps coming - _Aleksandar - 17.07.2011

Lines,maybe? -_-


Re: FIXED: Thanks to EliranPesahov and _Alexander - Toreno - 17.07.2011

No problem.