Unreachable Code. - 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: Unreachable Code. (
/showthread.php?tid=173451)
Unreachable Code. -
Scarface~ - 02.09.2010
Код:
C:\Users\Parent\Desktop\STUFF\Test\gamemodes\Roleplay.pwn(4258) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Код:
if(strcmp(cmd, "/buyvehicle", true) == 0)
What causes this ?
Re: Unreachable Code. -
Mauzen - 02.09.2010
I'd guess you have a return 1/0 right before that line, maybe you forgot to close the bracket of the last cmd.
unreachable code means, that you got code after e.g. a return, so this wont be called, because the return ends the function before.
Re: Unreachable Code. -
Scarface~ - 02.09.2010
Код:
}
return 1;
}
else { return 1; }
}
return 1;
}
//==============================================================================
if(strcmp(cmd, "/buyvehicle", true) == 0)
thats what i have
Edit : Solved the last command was a fucked it was like //=============if(strcmp(cmd, "/vehicle", true) == 0)
Re: Unreachable Code. -
Jochemd - 02.09.2010
Show us whole your OnPlayerCommandText (pastebin).
Re: Unreachable Code. -
DeathOnaStick - 02.09.2010
I think the changing of the position of last bracket before the error-line should fix it.
Edit, sry didnt see his edit
Re: Unreachable Code. -
Cameltoe - 02.09.2010
Unreachable code:
1.
return 1;
SendClientMessage;
2.
return 1;
}
return 1;
}
return 1;