Well, it appears that you are missing some code (he EndIf statement) related to this If statment {If RecvUDPMsg(udp) Then}
Did you post all of it? It doesn't appear that it should compile.
Did you post all of it? It doesn't appear that it should compile.