Hello guys,
I’m recently developing my own componet, but faced into a small problem. I usually use “len()” function to do a loop but this time it doesnt work dont know why, showing an error “float is not callable”. It works in other scripts but this time.
Hope someone can help this small problem.
Many thanksQuestion.gh (3.2 KB)
In line 21 of the script you overwrote the Python len function by mistake with something else. You should never use the in built function names. Choose a different name there.
@fin has correctly identified the reason why len() isn’t doing what you expected and @Dancergraham has reiterated that a python for loop takes care of the size of the list for you so the len() is unnecessary. Nothing for me to add!