Grasshopper

algorithmic modeling for Rhino

as follows:

Views: 245

Replies to This Discussion

Hi Carcassi,  watch your Indentation!

 

def a(b,c,d):

     return(blah blah)

# no indentation here

x = a(2,3,4)

print (x)

-Mostapha

What Mostapha said, your lacking indentation means that your def isn't actually called. Hence "out" is empty because you're not actually printing anything. Also "a" is null because it is not assigned to anything in your script.  

On a more important note, you have a def called "a" and an output variable called "a" plus you have an input variable called "x" which you then reassign to whatever the def returns! This causes confusion and errors (logical errors that is), consider naming variables and defs so that they are meaningful and unique.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service