Page 1 of 1

Math Error

PostPosted: Tue Jan 12, 2016 6:51 am
by HackinHoodLogicsTm
Hello guyz pls help me with this..

I have to text boxes with variable
[A] and [B]
Where A is for the textbox 1 and B for textbox 2

I have also change the textbox style by applying a mask..

Code: Select all
$##.#
this is the Mask

I have the same properties for the two text boxes

I also have a button on which I have the following code assigned to it but does gives error when I run it

Code: Select all
 Math  "[A]" * "[B]" "" "[Answer]"


WHere Variable Answer is in a text label

I know its not working because of the dollar symbol I added... But I really want to have the dollar sign show..

Please help.me guyz...Thanks

Re: Math Error

PostPosted: Tue Jan 12, 2016 8:13 am
by Rasl
Hi, Try
Math "[A]*[B]" "2" "[Answer]"

salu2

Re: Math Error

PostPosted: Tue Jan 12, 2016 9:02 am
by stu
Why dont you add the dollar sign after the the math operation?
Strip the Dollar signs from the incoming var:

Syntax: [ Download ] [ Hide ]
Using Neobook Syntax Highlighting
StrReplace "[aa]" "$" "" "[ab]" ""
StrReplace "[ba]" "$" "" "[bb]" ""
Math "[ab]*[bb]" "2" "[ca]"
setvar "[cb]" "$[ca]"
Parsed in 0.006 seconds, using GeSHi 1.0.8.10

Re: Math Error

PostPosted: Tue Jan 12, 2016 9:36 am
by Wrangler
Math "[A]" * "[B]" "" "[Answer]"


If you use the action wizard, you can avoid syntax errors like these.

Re: Math Error

PostPosted: Tue Jan 12, 2016 10:44 am
by HackinHoodLogicsTm
Thabks Guyz its really working. ..Thanks for ur support