why show error ? - Forum

Forum Navigation
You need to log in to create posts and topics.

why show error ?

Page 1 of 2Next

I am getting errors in variable [er] and [pa]

why ???

 

Uploaded files:
  • You need to login to have access to uploads.

I have no error

but i have error

 

Uploaded files:
  • You need to login to have access to uploads.

Hi Yasin,

Same to me, no error !

 

Uploaded files:
  • You need to login to have access to uploads.
YASIN has reacted to this post.
YASIN

@yasin no error here, run the pub to see if gives u an error

 

 

 

Uploaded files:
  • You need to login to have access to uploads.
YASIN has reacted to this post.
YASIN

luishp

@emmanuel-fernandez

Uploaded files:
  • You need to login to have access to uploads.

@yasin try to refresh the vars

YASIN has reacted to this post.
YASIN

@emmanuel-fernandez it did not work

@yasin

and if u inicialize with...

DefineVar "[er]" "Integer" "" "Global" ""
SetVar "[er]" ""
DefineVar "[pa]" "Integer" "" "Global" ""
SetVar "[pa]" ""

Math "([ScreenHeight]-290)/2" "0" "[er]"
Math "([ScreenWidth]-950)/2" "0" "[pa]"

 

YASIN has reacted to this post.
YASIN

Failed again @emmanuel-fernandez

@yasin Well, I can't think of anything else, try to ask @hpw for help to see if he knows why you get an error and the rest don't

YASIN has reacted to this post.
YASIN

@yasin

Worked for me too.

1) What is the version of your VisualNEOWin ? ... mine is 21.9.9

2) Create an all new pub; then try these tests (one by one), and advise of your results ...

a) use variables other than [er] or [pa]

Math "([ScreenHeight]-290)/2" "0" "[yasiner]"
Math "([ScreenWidth]-950)/2" "0" "[yasinpa]"

b) avoid the division sign

Math "([ScreenHeight]-290)" "0" "[yasiner]"
Math "([ScreenWidth]-950)" "0" "[yasinpa]"

c) remove the minus sign as well

Math "[ScreenHeight]" "0" "[yasiner]"
Math "[ScreenWidth]" "0" "[yasinpa]"

 

YASIN has reacted to this post.
YASIN

@gaev

I do not know the version of the app

I created a new pub file and new variables

In mode A: display error.

In mode B: the result was correct.

In mode C: the result was correct. ([ScreenHeight]=[yasiner]  and  [ScreenWidth]=[yasinpa] )

@yasin

I do not know the version of the app

While in design Mode, press function key F2

In mode B: the result was correct.
In mode C: the result was correct.

Looks like the division sign is causing the error on your machine; perhaps something in your Windows Regional Setting.

Try this command ...

SetVar "[myNumber]" "50"
Math "[myNumber]/2" "0" "[er]"

... if it also fails, then the division character is definitely the problem ... in which case you might want to replace "division by 2" with "multiplication by 0.5" ...

Math "([ScreenHeight]-290)*0.5" "0" "[er]"
Math "([ScreenWidth]-950)*0.5" "0" "[pa]"

 

YASIN has reacted to this post.
YASIN

Hello,

You may also place a text-object with [ScreenHeight] and [ScreenWidth] on screen to look if they are correctly set.

Regards

Hans-Peter

YASIN has reacted to this post.
YASIN

@gaev

my ver is 21.9.9


SetVar "[myNumber]" "50"
Math "[myNumber]/2" "0" "[er]"

result : er=50     :)


Math "([ScreenHeight]-290)*0.5" "0" "[er]"
Math "([ScreenWidth]-950)*0.5" "0" "[pa]"

It is true

 

Now it is clear that the problem is with the division sign
But how should I fix it?

@yasin

my ver is 21.9.9

Looks uptodate.

Just to confirm, what version of Windows are you using ? ... and is it natively installed or something that emulates Windows under another operating system ?

result : er=50 :)

Very interesting (but unexpected) result.

Now it is clear that the problem is with the division sign
But how should I fix it?

Since others (including me) do not encounter any problems, I still think it has something to do with your environment.

Before I suggest you delete and reinstall VisualNEOWin, you might try this ...

SetVar "[abcd]" "790"
SetVar "[er]" "([abcd]-290)/2"

... and then ...

SetVar "[er]" "([ScreenHeight]-290)/2"

 

@yasin

Another thing to try ...

SetVar "[myHeight]" "[ScreenHeight]"
SetVar "[myDivisor]" "2"
Math "([myHeight]-290)/[myDivisor]" "0" "[myAnswer]"

 

@gaev

My Windows is natively installed (Windows 10 Pro)


SetVar "[abcd]" "790"
SetVar "[er]" "([abcd]-290)/2"

result : er=(790-290)/2


SetVar "[er]" "([ScreenHeight]-290)/2"

 

result : (864-290)/2

Page 1 of 2Next