Operator '<' cannot be used with a left hand side of type 'boolean' and a right hand side of type 'System.Decimal'.

I want to build a parking script, and I tried with my own ideea (the car [target] has to be between the X and Z of the parking place). I did this:

#pragma strict
public var position: Vector3;
function Start () {

}

function Update () {
var target;
var minx : System.Decimal;
var maxx : System.Decimal;
var minz : System.Decimal;
var maxz : System.Decimal;
var currx : System.Decimal = transform.position.x;
var currz : System.Decimal = transform.position.z;
if(minx < currx < maxx & minz < currz &l; maxz)
{
   print("Successfull");
}
}

But, I get this error two times:

Operator ‘<’ cannot be used with a
left hand side of type ‘boolean’ and a
right hand side of type
‘System.Decimal’.

I know what boolean means (true/false) and a decimal number is something like: 34.43.

minx < currx < maxx

Is not proper syntax

You’re syntax is definitely not valid. For more targeted help, should probably state exactly what you’re trying to do. From the looks of your code, I assume you’re trying to determine if both an x-value and a z-value falls within some valid range. Here’s one way to do that…

if (currx >= minx && currx <= maxx && currz >= minz && currz <= maxz)
{ 

    print("Successfull");
}