Trying to declare an IP using a variable

I think the problem is that you are trying to call a constructor after the (static) variable has been declared. I believe this isn't allowed.