Condition Expression Debug Message

For questions about using Classic.

Post » Tue Nov 23, 2010 7:38 pm

Hey,

I'm using a "condition expression" and it works perfectly but whenever I use the debug option this message pops up "Cannot test condition expression on a non-integer type. Operator had no effect."

The code works correctly, but it's just a little annoying to deal with this every time I debug.

Here's the code, if needed: [code:qx10do8d]Trail[CustomMovement].Speed<1000 ? Lerp(Trail.Width, 1, 10*TimeDelta):Lerp(Trail.Width, ((Min(Trail[CustomMovement].Speed/50, 30))*(Trail.Opacity/100)), 10*TimeDelta)[/code:qx10do8d]

What's up?
Follow me on Twitter @evgLabs
B
33
S
14
G
4
Posts: 251
Reputation: 4,049

Post » Tue Nov 23, 2010 10:31 pm

Looks like somethings getting turned into a string. Might try adding an int() on both sides.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Tue Nov 23, 2010 10:37 pm

That's what I thought. Could this be a bug?

I'll try it though.

Thanks
Follow me on Twitter @evgLabs
B
33
S
14
G
4
Posts: 251
Reputation: 4,049

Post » Tue Nov 23, 2010 10:40 pm

Hmm, the message says "Cannot test...". So I would guess it has problems comparing the float Trail[CustomMovement].Speed against the int 1000

Maybe just setting 1000.0 solves it? [Or int(Trail[CustomMovement].Speed), but then you're losing accuracy]
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Tue Nov 23, 2010 10:53 pm

I wouldn't call it a bug, it's just that the debugger is very particular.
Good in some ways, bad in others.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests