Error - 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: Error (
/showthread.php?tid=319222)
Error -
viddo - 18.02.2012
Код:
C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(67619) : warning 225: unreachable code
Код:
new x_nr[24];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) {
Код:
C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(61710) : error 008: must be a constant expression; assumed zero
Код:
else if{strcmp(x_nr,"8",true) == 0)
Re: Error -
Nonameman - 18.02.2012
Quote:
Originally Posted by viddo
Код:
C:\Users\Viddo\Desktop\LARP 4.0\LARP 4.0 D\gamemodes\larp.pwn(67619) : warning 225: unreachable code
|
There's a return that exits your function and makes a part of your code unreachable, like:
pawn Код:
public function() {
...code... // this can be reached
return 1;
...code... // this can't be reached
}
Try to find that unnecessary return.
Quote:
Originally Posted by viddo
Код:
else if{strcmp(x_nr,"8",true) == 0)
|
After 'else if' change the '{' to '('.
Re: Error -
viddo - 18.02.2012
Thanks