Jump to content
Developer Wiki and Function Reference Links ×

{ Error: The operands are not of compatible types. }


Recommended Posts

I'm getting this error message in unexpected places.  Including functions with no operands.  For example in a solid subtraction:

 

		tempHandle1 := LObject;
		tempHandle := PrevObj(tempHandle1);
		result := IntersectSolid(tempHandle, tempHandle1, tempHandle2);
		ResetOrientation3D;
		Rotate3D(#0.0000000000000d,#-0.0000000000000d,#0.0000000000000d);
		Move3D(0",0",0");

 

I'm getting that error on the line ResetOrientation3D;  I've experienced a lot of error messages 🙂 and so I'm aware that the error is often in a nearby line, but I don't see where.  All the tempHandles are defined as handle variables. 

 

Also here:  

		…
		tempHandle1 := LObject;
		tempHandle := PrevObj(tempHandle1);
		result := SubtractSolid(tempHandle, tempHandle1, tempHandle2);
		
		BeginXtrd(0",0.05");
			RectangleN(-0.656",0.341641697326893",0.039370078740157",0",1.312",0.054089086164082");
			NoShadows(LNewObj);
			objectHandle := LNewObj;
			SetObjectVariableBoolean(objectHandle, 1160, FALSE);
			boolResult := SetEntityMatrix(objectHandle, 0",0",0",0,-0,0);

		EndXtrd;
		ResetOrientation3D;
		Rotate3D(#0.0000000000000d,#-0.0000000000000d,#0.0000000000000d);
		Move3D(0",0",0.248855109792259");

 

 

BeginXtrd(0",0.05"); gets the same error message.

 

As is my wont, I copied all this from a script export 🙂, which makes the error message even more puzzling.  

 

Anybody know what's going on here?

 

 

 

 

 

Link to comment

Sorry for the delay.  Time zone weirdness :-).

 

I added a procedure, run, begin, end and VAR declarations.

 

PROCEDURE TEST;

VAR
objectHandle,tempHandle, tempHandle1, tempHandle2
: HANDLE;

boolResult, result
: BOOLEAN;

BEGIN 


NameClass('None');
BeginXtrd(0",0.3");
PenSize(2);
PenPatN(2);
FillPat(1);
PenFore(0,0,0);
PenBack(65535,65535,65535);
FillFore(0,0,0);
FillBack(65535,65535,65535);
RRectangleN(-0.656",-1.294",0.039370078740157",0",1.312",2.588",0.2",0.2");
objectHandle := LNewObj;
SetDropShadowData(objectHandle, 0,0.003937,0.001969,#315.0000000000d,75,0,0,0);
EnableDropShadow(objectHandle, FALSE);

objectHandle := LNewObj;
SetObjectVariableBoolean(objectHandle, 1160, FALSE);
boolResult := SetEntityMatrix(objectHandle, 0",0",0",0,-0,0);

EndXtrd;
ResetOrientation3D;
Rotate3D(#0.0000000000000d,#-0.0000000000000d,#0.0000000000000d);
Move3D(0",0",0");
objectHandle := LNewObj;
SetDropShadowData(objectHandle, 0,0.003937,0.001969,#315.0000000000d,75,0,0,0);
EnableDropShadow(objectHandle, FALSE);


BeginXtrd(-0.656",0.675744405755057");
OvalN(-4.704541031598826",-1.874808580246114",0.039370078740157",0",1'1.579999999999998",2.1725");
objectHandle := LNewObj;
SetDropShadowData(objectHandle, 0,0.003937,0.001969,#315.0000000000d,75,0,0,0);
EnableDropShadow(objectHandle, FALSE);

objectHandle := LNewObj;
SetObjectVariableBoolean(objectHandle, 1160, FALSE);
boolResult := SetEntityMatrix(objectHandle, 0",0",0",0,-0,0);

EndXtrd;
ResetOrientation3D;
Rotate3D(#90.00000000000d,#-0.0000000000000d,#90.00000000000d);
Move3D(0",0",0");
objectHandle := LNewObj;
SetDropShadowData(objectHandle, 0,0.003937,0.001969,#315.0000000000d,75,0,0,0);
EnableDropShadow(objectHandle, FALSE);


tempHandle1 := LObject;
tempHandle := PrevObj(tempHandle1);
result := IntersectSolid(tempHandle, tempHandle1, tempHandle2);
ResetOrientation3D;
Rotate3D(#0.0000000000000d,#-0.0000000000000d,#0.0000000000000d);
Move3D(0",0",0");
objectHandle := LNewObj;
SetDropShadowData(objectHandle, 0,0.003937,0.001969,#315.0000000000d,75,0,0,0);
EnableDropShadow(objectHandle, FALSE);


BeginXtrd(0",0.05");
RectangleN(-0.504",0.468",0.039370078740157",0",1.008",0.65");
objectHandle := LNewObj;
SetDropShadowData(objectHandle, 0,0.003937,0.001969,#315.0000000000d,75,0,0,0);
EnableDropShadow(objectHandle, FALSE);

objectHandle := LNewObj;
SetObjectVariableBoolean(objectHandle, 1160, FALSE);
boolResult := SetEntityMatrix(objectHandle, 0",0",0",0,-0,0);

EndXtrd;
ResetOrientation3D;
Rotate3D(#0.0000000000000d,#-0.0000000000000d,#0.0000000000000d);
Move3D(0",0",0.25");
objectHandle := LNewObj;
SetDropShadowData(objectHandle, 0,0.003937,0.001969,#315.0000000000d,75,0,0,0);
EnableDropShadow(objectHandle, FALSE);


tempHandle1 := LObject;
tempHandle := PrevObj(tempHandle1);
result := SubtractSolid(tempHandle, tempHandle1, tempHandle2);
BeginXtrd(0",0.05");
RectangleN(-0.656",0.341641697326893",0.039370078740157",0",1.312",0.054089086164082");
objectHandle := LNewObj;
SetDropShadowData(objectHandle, 0,0.003937,0.001969,#315.0000000000d,75,0,0,0);
EnableDropShadow(objectHandle, FALSE);

objectHandle := LNewObj;
SetObjectVariableBoolean(objectHandle, 1160, FALSE);
boolResult := SetEntityMatrix(objectHandle, 0",0",0",0,-0,0);

EndXtrd;
ResetOrientation3D;
Rotate3D(#0.0000000000000d,#-0.0000000000000d,#0.0000000000000d);
Move3D(0",0",0.248855109792259");
objectHandle := LNewObj;
SetDropShadowData(objectHandle, 0,0.003937,0.001969,#315.0000000000d,75,0,0,0);
EnableDropShadow(objectHandle, FALSE);


tempHandle1 := LObject;
tempHandle := PrevObj(tempHandle1);
result := SubtractSolid(tempHandle, tempHandle1, tempHandle2);
BeginXtrd(0",0.05");
RectangleN(-0.656",0.341641697326893",0.039370078740157",0",1.312",0.054089086164082");
objectHandle := LNewObj;
SetDropShadowData(objectHandle, 0,0.003937,0.001969,#315.0000000000d,75,0,0,0);
EnableDropShadow(objectHandle, FALSE);

objectHandle := LNewObj;
SetObjectVariableBoolean(objectHandle, 1160, FALSE);
boolResult := SetEntityMatrix(objectHandle, 0",0",0",0,-0,0);

EndXtrd;
ResetOrientation3D;
Rotate3D(#0.0000000000000d,#-0.0000000000000d,#0.0000000000000d);
Move3D(0",-0.661641697326893",0.210077178945487");
objectHandle := LNewObj;
SetDropShadowData(objectHandle, 0,0.003937,0.001969,#315.0000000000d,75,0,0,0);
EnableDropShadow(objectHandle, FALSE);


tempHandle1 := LObject;
tempHandle := PrevObj(tempHandle1);
result := SubtractSolid(tempHandle, tempHandle1, tempHandle2);
ResetOrientation3D;
Rotate3D(#90.00000000000d,#-0.0000000000000d,#180.0000000000d);
Move3D(0",0",0");
objectHandle := LNewObj;
SetDropShadowData(objectHandle, 0,0.003937,0.001969,#315.0000000000d,75,0,0,0);
EnableDropShadow(objectHandle, FALSE);


END;

RUN(TEST);

 

Link to comment

result should have a variable type of Integer instead of Boolean.

 

The IntersectSolids and SubtractSolids return an Integer.  

 

Also, there seems to be a lot of extra junk.  Why are you applying DropShadows before you extrude? Isn't Drop Shadow a 2D only thing?

 

Also, there are a couple of places where it looks like the LNewObj is being used twice in a row.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...