Posts: 123
Threads: 4
Joined: Jan 2009
Reputation:
0
PAWN produces an "unreachable code" warning if anything is written after a return within the same bracket compartment. However, I'm using the "goto" function (basically lets you jump to a certain line in the code), and pawn still says it's unreachable. To make sure, I've tested it and it works fine.
What's the easiest way to stop this warning? I can't find a pragma function for that specific warning in the pawn-lang.pdf.
Edited for spelling.
Posts: 1,042
Threads: 32
Joined: Apr 2008
Reputation:
0
Post the line the error is coming from.
Posts: 123
Threads: 4
Joined: Jan 2009
Reputation:
0
Out of curiosity... what piece of information weren't you given :P?
And, correct me if I'm wrong, but that is a warning saying that the piece of code in that position wont be able to run in the server. Unreachable. As it is able to run, it's mistakenly giving me warning. When a program makes a mistake, it's formally known as a bug.
Posts: 1,501
Threads: 19
Joined: Nov 2007
Reputation:
0
What's the point though? Why not just put it before the return?
Posts: 123
Threads: 4
Joined: Jan 2009
Reputation:
0
Because I need it to stop the code there under some none-else circumstances.
I'm not here looking for a code fix, the code is fine (hence the reason I'm calling it a "bug"). I'm just here looking for a "pragma" or else to stop the warning.
Posts: 988
Threads: 9
Joined: Jul 2006
Reputation:
0
We don't see enough of your code.. try break;
No, your code isn't fine, it's obvious that you can't do anything under return.