Python 2.7 - Error at line 298 - What is wrong with my code?
<p>Here is the code from the last if: to the next if:</p>

<pre><code>if msgtype == "\x00":
    utflength=struct.unpack("!h", data[:2])[0]
    name=str(data[2:int(utflength)+2])
    data=data[utflength+2:]
    utflength=struct.unpack("!h", data[:2])[0]
    message=data[2:utflength+2]
    self.sendOutput("To " + name + ": " + message)
else:
    utflength=struct.unpack("!h", data[:2])[0]
    name=str(data[2:int(utflength)+2])
    data=data[utflength+2:]
    utflength=struct.unpack("!h", data[:2])[0]
    message=data[2:utflength+2]
    self.sendOutput("From " + name + ": " + message)
else:
    utflength=struct.unpack("!h", data[:2])[0]
    name=str(data[2:int(utflength)+2])
    data=data[utflength+2:]
    utflength=struct.unpack("!h", data[:2])[0]
    message=data[2:utflength+2]
    self.sendOutput("From " + name + ": " + message)
</code></pre>
