Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: geast on February 06, 2014, 03:24:15 AM

Title: Internal error <SetUserDRO>
Post by: geast on February 06, 2014, 03:24:15 AM
A very strange error only in windows XP

I write a simple macro in windows XP

Dim  Y As Integer
Dim A  As Double

Y = 1000
A = 1234

aaa= GetUserDRO(1000)

SetUserDRO(Y,A)

and when i executed in windows vista everything is ok, but when in XP i have an error Internal error <SetUserDRO>.
Please check the attached pictures(http://)
Title: Re: Internal error <SetUserDRO>
Post by: stirling on February 06, 2014, 05:28:21 AM
Works fine here under XP but usually this CB "internal error" is down to some subtle syntax error. According to VB syntax a procedure call shouldn't have () unless it's called via the CALL keyword. Sometimes it works out ok and sometimes it doesn't. You could try changing line 9 to:

SetUserDRO Y, A

or if you want the parentheses

Call SetUserDRO(Y, A)

Also it's always a good idea to assign explicit real numbers to real variables i.e.

A = 1234.0
Title: Re: Internal error <SetUserDRO>
Post by: geast on February 06, 2014, 05:42:21 AM
None worked, either the parenthesis nor the Call, or the 123.4
Any other ideas?
Title: Re: Internal error <SetUserDRO>
Post by: stirling on February 06, 2014, 05:47:26 AM
try taking out the explicit typing of A and Y i.e. remove the two DIMs also remove the call to getUserDRO as it's not doing anything at the moment.
Title: Re: Internal error <SetUserDRO>
Post by: geast on February 06, 2014, 06:02:32 AM
No luck, i attach the pictures, as simple as it gets.
The mach version im using is R3.043.022.
Title: Re: Internal error <SetUserDRO>
Post by: stirling on February 06, 2014, 06:13:31 AM
Best I can suggest is you try a re-install of Mach - maybe ENABLE40.DLL got corrupted but that's clutching at straws. I'm on the same Mach version and XP.
Title: Re: Internal error <SetUserDRO>
Post by: geast on February 07, 2014, 12:52:30 AM
Yes after a fresh installation, now i'm running R03.043.066 everything works fine. Thanks alot.
Title: Re: Internal error <SetUserDRO>
Post by: stirling on February 07, 2014, 06:04:48 AM
Cool. In that case I suspect your original version (022) would also be fine after a re-install. Anyway - you're up and running so thanks for getting back.