Follow closely the code given in the example for 
heightZ http://www.singular.uni-kl.de/Manual/la ... tm#SEC1832 As shown in the example, this procs needs the primdecint.lib 
 to be loaded. Put the quotation marks at the right place.
 Instead of rational numbers i.e. r =0,(x,y,z),dp;
 you should choose here 
integers for the coefficients.
 To your questions:
 The exponent for variables have to be non-negative. Thus
 Laurent polynomials in ringvariables can not be defined.
 Negative exponents are only allowed for parameters.
 This means, if you are working over a function field, then
  the coefficients can be rational functions.
 However, the funtion heightZ can not be applied to those expressions. 
 If you want to work  with x1,x2,x3,x4, then define a ring
 with these variables. Note that you have to put the * and ^  now.
Code:
 > ring rZZ = integers,(x1,x2,x3,x4),dp;
 > ideal I = 13*x1^2,17*x2^4;