Source language: Translate to:

Math Error

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Math Error

Postby HackinHoodLogicsTm » Tue Jan 12, 2016 6:51 am

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
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
User avatar
HackinHoodLogicsTm
 
Posts: 120
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana

Re: Math Error

Postby Rasl » Tue Jan 12, 2016 8:13 am

Hi, Try
Math "[A]*[B]" "2" "[Answer]"

salu2
Rasl
 
Posts: 129
Joined: Sat Apr 02, 2005 8:25 am
Location: Buenos Aires, Argentina

Re: Math Error

Postby stu » Tue Jan 12, 2016 9:02 am

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
User avatar
stu
 
Posts: 320
Joined: Wed Aug 07, 2013 11:37 am

Re: Math Error

Postby Wrangler » Tue Jan 12, 2016 9:36 am

Math "[A]" * "[B]" "" "[Answer]"


If you use the action wizard, you can avoid syntax errors like these.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1506
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: Math Error

Postby HackinHoodLogicsTm » Tue Jan 12, 2016 10:44 am

Thabks Guyz its really working. ..Thanks for ur support
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
User avatar
HackinHoodLogicsTm
 
Posts: 120
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest

cron