code error

What does it mean when meshes has no attribute in a python code that uses navmeshes?

Could you rephrase your question? Currently I can’t get what you mean :wink:

You are dividing by zero?


I am trying to correct the code of member Jay-Dee-892 useful script for ai and spawning characters because it is not working for me.I am using blender 2.62.It is in the game engine resources forum.

This is what i get in the console of blender= File “mesh”, line 16, in <module>
AttributeError: ‘NoneType’ object has no attribute ‘meshes’
Python script error - object ‘Empty’, controller ‘Python’:
Traceback (most recent call last):

This error means you have a reference to object “None”. This is a singleton which represents the absence of data.
Most-likely a previous calculated had no result and returned None.

You can verify your result with:

if whatevervariable is None:
  print("damn hell whatevervariable is not set")
print ("whatevervariable is set with",whatevervariable)

But this only solves the symptom. I guess there is an error at an earlier stage.