Hi All,
I’m getting to an intermediate level with grasshopper but don’t have much experience incorporating mathematical formulas into my scripts. Not sure what is going wrong here, trying both evaluate and expression components but both are generating an error that reads: Expression generated an error for (q, f, w). Invalid expression 1364. I have looked into similar posts/threads and tried renaming variables, using draw full names but nothing has worked. I’m sure I’m just making a simple mistake because this formula really isn’t that complicated.
I’ve attached a photo and my script. Any help would be greatly appreciated!
Evaluate Formula Error.gh (10.3 KB)
Your expression is missing some operators, like “*”; you have this:
((10q)/((2f-1)(29+20w)))+((116fw)/((2f-1)(29+20w)))+((58w)/((2f-1)(29+20w)))
Should be more like this, but it’s still wrong - perhaps mis-matched parentheses?
((10*q)/((2*f-1)(29+20*w)))+((116*f*w)/((2*f-1)(29+20*w)))+((58*w)/((2*f-1)(29+20*w)))
ERROR message:
- Expression generated an error for (q, f, w): A number of tokens could not be evaluated: {), +, (, (, 116, *, f, *, w, ), /, (, (, 2, *, f, -, 1, ), (, 29, +, 20, *, w, ), ), ), +, (, (, 58, *, w, ), /, (, (, 2, *, f, -, 1, ), *, 29, +, 20, *, w, ), ), )}
P.S. Got it 
((10*q)/((2*f-1)*(29+20*w)))+((116*f*w)/((2*f-1)*(29+20*w)))+((58*w)/((2*f-1)*(29+20*w)))
Evaluate_2025Jan31a.gh (5.2 KB)
P.P.S. By the way, instead of using a text panel for your expression you can right-click on the ‘Expression’ input and choose “Expression Editor”, then type or paste your expression. It offers a little more help as you type about what is correct or not.
Thank you so much! Didn’t realized parentheses next to each other wouldn’t be interpreted as multiplication like typical mathematical notation.