title: Solidity error: Expected identifier, got 'LParen'
body: <p>I'm getting the error:</p>
  
  <pre><code>Expected identifier, got 'LParen'
  </code></pre>
  
  <p>Problem is, this code is from the Solidity docs! I have tried many thing for this error but to no avail. The link where I got the code is: <a href="https://solidity.readthedocs.io/en/latest/solidity-by-example.html" rel="noreferrer">https://solidity.readthedocs.io/en/latest/solidity-by-example.html</a></p>
  
  <p>I have an image attached with the error:</p>
  
  <p><a href="https://i.stack.imgur.com/sJoHg.png" rel="noreferrer"><img src="https://i.stack.imgur.com/sJoHg.png" alt="enter image description here"></a></p>
  
  <p>Can someone explain to me what I'm doing wrong? I have the right version, as per below:</p>
  
  <p>kalyan@kalyan:/usr/bin$ truffle version</p>
  
  <p>Truffle v4.1.13 (core: 4.1.13)</p>
  
  <p>Solidity v0.4.24 (solc-js)</p>
  
  <p>This is running on Ubuntu 18.04. Is there something else I should be doing?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The code before constructor is:</p>
  
  <pre><code>/// Modifiers are a convenient way to validate inputs to
  /// functions. `onlyBefore` is applied to `bid` below:
  /// The new function body is the modifier's body where
  /// `_` is replaced by the old function body.
  modifier onlyBefore(uint _time) { require(now &lt; _time); _; }
  modifier onlyAfter(uint _time) { require(now &gt; _time); _; }
  </code></pre>