"incompatible with String" errors

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
fightcancer
Macro Veteran
Posts: 239
Joined: Fri Apr 15, 2005 8:32 am

"incompatible with String" errors

Post by fightcancer » Fri Oct 07, 2022 1:39 am

EDIT: resolved! Found that the variable TheRowWithATrader was empty when the error occurred even though post macro execution showed a value of 6 in the Watch List.

Trying to figure out why MS is generating occasional errors. Less than half the time I get these 5 MS errors when running my macro.

Line: 1411 Operator opMinus incompatible with String
Line: 1411 Operator opMinus incompatible with String
Line: 1411 Operator opMult incompatible with String
Line: 1411 Operator opMult incompatible with String
Line: 1411 Internal parser error. Code 10

Here's line 1411:
Let>TempY={%EAPixelY% + (%TheRowWithATrader% - 1) * 16}

According to Watch List:
0: EAPIXELY=977
0: THEROWWITHATRADER=6

Why would this line ever cause errors?
Why would this line sometimes cause errors and sometimes not?

(The Watch List values above are from an instance when MS generated those 5 error messages.)

Thanks in advance!

EDIT: resolved! Found that the variable TheRowWithATrader was empty when the error occurred even though post macro execution showed a value of 6 in the Watch List.
Last edited by fightcancer on Fri Oct 07, 2022 5:26 am, edited 1 time in total.

User avatar
Grovkillen
Automation Wizard
Posts: 1009
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: "incompatible with String" errors

Post by Grovkillen » Fri Oct 07, 2022 4:09 am

Trailing spaces maybe? Do a test by multiply the values by zero and check if the test result is zero. If not then add a breakpoint and investigate.
Let>ME=%Script%

Running: 15.0.24
version history

fightcancer
Macro Veteran
Posts: 239
Joined: Fri Apr 15, 2005 8:32 am

Re: "incompatible with String" errors

Post by fightcancer » Fri Oct 07, 2022 5:26 am

Thanks. It's resolved now! Found that the variable TheRowWithATrader was empty when the error occurred even though post macro execution showed a value of 6 in the Watch List.

User avatar
Grovkillen
Automation Wizard
Posts: 1009
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: "incompatible with String" errors

Post by Grovkillen » Fri Oct 07, 2022 5:17 pm

Aha, great.
Let>ME=%Script%

Running: 15.0.24
version history

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts