what values are exactly in your var1 to var4?
Where is your text frame positioned?
On the page? Is it anchored? Is it part of a table cell?
Can the pasteboard hold the text frame after the values are set in the UI?
Usually that kind of a message comes when the values for your variables won't work: bottom bounds is less than top bounds or will interfere with margin settings; the same for right bounds being less than left bounds. Double-check your values, the measurement units in place, etc.
A tricky one is possibly inset spacings. InDesign will ignore geometric bounds that conflict with those.
Var1 to var4 are geometric bounds of the textframe of the previous page.
Textframe is positioned on the page. it is not anchored.
Without seeing any actual values, it's hard to tell what's going wrong.