There seems to be some issues with the code you have posted. Please try putting it in a Mathematica code section. To do this, paste the code into the editor, highlight it, and then click the Mathematica red spiky logo in the editor.
The error message you are seeing means that the integrand for the NIntegrate statement has a variable in it. If you would like to nest numeric functions like this, please consider using ?NumericQ as shown in this tutorial:
http://support.wolfram.com/kb/3820. Additionally, if you are doing a double integral, NIntegrate is capable of handling those as well. For example:
(*A double integral*)
NIntegrate[Sin[x y], {x, 0, 10}, {y, 0, 1}]
Note that if we want to use functions like you did, the following will usually not work and at least give warning messages for the reasons mentioned in the tutorial:
myFunction [y_] := NIntegrate[Sin[x y], {x, 0, 10}]
NIntegrate[myFunction[y], {y, 0, 1}]
Use ?NumericQ to delay the evaluation of myFunction until y is given a numeric value:
Clear[myFunction];
myFunction [y_?NumericQ] := NIntegrate[Sin[x y], {x, 0, 10}]
NIntegrate[myFunction[y], {y, 0, 1}]