Kelly, initially, I would suggest you have your weight and height measurements in the same type of units (kg or cm) and write your code when you square it as (Height * Height). Your code of x<>0 seems as though it would generate an error as the program would read it as less than and great than 0. Sometimes you get errors that say one thing but the snytax is missing a parenthesis or a quotation mark, so I would go back over your syntax. Hope this helps.
Josephine