SA-MP Forums Archive
One Warning -.- - 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: One Warning -.- (/showthread.php?tid=203550)



One Warning -.- - ZmaXy - 27.12.2010

Warning:
Код:
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC4\gamemodes\CYBER.pwn(43777) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Line:
Код:
if(newkeys & KEY_FIRE)
What the problem?


Re: One Warning -.- - Crime Life ROLEPLAY - 27.12.2010

Код:
if (newkeys & KEY_FIRE)
Try this


Re: One Warning -.- - admantis - 27.12.2010

Quote:
Originally Posted by Crime Life ROLEPLAY
Посмотреть сообщение
Код:
if (newkeys & KEY_FIRE)
Try this
No fucking difference. Unreachable code means he placed a code in a wrong line; like under the wrong bracket, for example. We need your whole command / function to fix it, than.


Re: One Warning -.- - randomkid88 - 27.12.2010

An example of this would be something like
pawn Код:
{
     Function 1;
     return 1;
     Function 2;
}
You would get this error because Function 2 would never be executed (aka "unreachable") because you returned a value already. Look for something like this, where you return a value but then try to execute something else within the same bracket.
This, however, is acceptable:
pawn Код:
{
     {
          Function 1;
          return 1;
     }
     Function 2;
}
Or just post your code


Re: One Warning -.- - TouR - 27.12.2010

Код:
if(newkeys == KEY_FIRE)