Help with Error Code?
Posted: Wed Sep 14, 2011 7:52 pm
Hello,
I am working on a very simple school project using LiveCode (a recipe for cookies), however sometimes when multiplying two varibles together I encounter sometimes the error: button "Convert to Imperial": execution error at line 8 (Operators *: error in left operand), char 8"
Here is some of the code:
variables s, b, f, e and c are all global variables on a different button, and their value changes depending on the number of cookies the user wishes to make. My question is relatively simple, what is going wrong? I cannot find the cause of the problem, as it seems not to occur every time I multiply varibles, only sporadically.
Thanks,
Daz
I am working on a very simple school project using LiveCode (a recipe for cookies), however sometimes when multiplying two varibles together I encounter sometimes the error: button "Convert to Imperial": execution error at line 8 (Operators *: error in left operand), char 8"
Here is some of the code:
Code: Select all
on mouseUp
global imperial
put "Ingredients (oz):" into field "ingredients"
//imperial
put 0.0352739619 into imperial
put s*imperial into s
put s into field "sugar"
put b*imperial into b
put b into field "butter"
put f*imperial into f
put f into field "flour"
//imperical measurements not needed for number of eggs
put c*imperial into c
put c into field "chocolate"
end mouseUp
Thanks,
Daz