Reassign value of variable
<p>I'm using C# and reading a line of text (ln) and assigning an image to a picture box.  After the image is selected, I check to see if it's night or day and attempt to change the selected image to the night version if the sun has gone done.</p>

<pre><code>        charPos = ln.IndexOf("partly cloudy", 0);
        if (charPos &gt; -1)
        {
            skyimg = "sct.jpg";
            skymsg = "Partly Cloudy";
            If (AMPM = "P") skyimg = "nsct.jpg";
        }
</code></pre>

<p>The compiler tells me I'm missing a semi-colon and just doesn't like that second "if" check.
Do I have to use an "else if" and include both possible conditions in each check?</p>
