Similar to Russel's example before, just using the SSI_GetValue function (v7 or later). Also assuming the first question is q1 and the second question is q1dk.
One difference is that with a constant sum question, you can actually check the totals box that we put up on the screen, so it's a little less code.
if(SSI_GetValue("q1_total") == 0 && SSI_GetValue("q1dk_1")==0)
{strErrorMessage = "Put in number or check the do not know box";}
if(SSI_GetValue("q1_total") > 0 && SSI_GetValue("q1dk_1")==1)
{strErrorMessage = "If you check the box, you remove the values from the subtopics";}