Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Location
    Alabama
    Posts
    109

    error when maksing input boxes

    I have several input boxeson a screen to enter numbers into for performing simple math.
    I have the follwiwing lines of script to make sure someone enters something into the boxes.


    if Input.GetText("Input2") == "" then Dialog.Message("Complete Wage Info", "Please Enter Average Hourly Wage Of Workers On Site", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    else

    Now when I run the program, if someone deletes the 0 out of the text box and hits the calculate butto I get :

    Onclick line 31, Attempt to preform arithmatic on global 'value1'(a string value)

    It didn't do this I maksed the input box to allow numbes only?

  2. #2
    Join Date
    Oct 2003
    Posts
    908
    Just put in a check to make sure they entered *something*. If it's empty, it's technically a string value of "" being returned.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts