user56727: I got this small code I'm trying things on for like an hour.
int receivers = 0;
#if defined(PPM_RECEIVER)
  receivers++;
#endif

And I just cannot get it working, It keeps returning a "'receivers' does not name a type" on line 4.

user4143: You can't use commands like receivers++ outside of a function.  That is runtime executable code, and has to be run from inside a function. Global scope doesn't get executed in the same way as code in a function.

56727: <p>I got this small code I'm trying things on for like an hour.</p>

<pre><code>int receivers = 0;
#if defined(PPM_RECEIVER)
  receivers++;
#endif
</code></pre>

<p>And I just cannot get it working, It keeps returning a "'receivers' does not name a type" on line 4.</p>
 4143: <p>You can't use commands like <code>receivers++</code> outside of a function.  That is runtime executable code, and has to be run from inside a function. Global scope doesn't get executed in the same way as code in a function.</p>
