i have trouble with vehicle wrapper

What does this mean?

Blender Game Engine Start
  File "C:\Users\barbara\Desktop\endless runner car game.blend\VehicleWrapper.py", line 102, in main
  File "C:\Users\barbara\Desktop\endless runner car game.blend\VehicleWrapper.py", line 46, in initialiseCar
AttributeError: 'NoneType' object has no attribute 'addWheel'

Blender Game Engine Finished

It all of sudden stopped working.

It means that whatever variable on line 46 is, it is None for some reason. And obviously, a None will not have an “addWheel” attribute. Check your variable on line 46 and try to figure out why it is None.

Please take a look at my blend.And see what is wrong with the vehicle
wrapper script.

Attachments

Now.zip (12.3 MB)

did anyone take a look at it?

You overwrite the variable “suspension”
Change line 25 to 26 to this.


constraint = PhysicsConstraints.createConstraint(pid, 0, 11)
cid = constraint.getConstraintId()

that did not fix the problem.

I have tested it and it works on my PC. The wheels are on the car, I can get in and drive and no error any more.
I only have a new error “KeyError: ‘requested item “shiftGear” does not exist’”

  1. Did you changed the correct file VehicleWrapper.py (not VehicleWrapper2.py)?
  2. Did you checked if there is no new error after making the changes? Like indentation.
  3. You have to VehicleWrapper.py running. One on Cube.466 and one on Car. That is not good.
  4. Did you use UPBGE or BGE?

It still did not work.And i put what you said.Take a look at it.

Attachments

Now2.zip (11.4 MB)

Which Blender Version (build) did you use?
Did you installed UPBGE 0.1.8?

The Now2.zip works for me. Tested with Blender 2.77a (32bit), 2.78c (64bit), 2.79-rc1 (64bit), UPBGE 0.1.9 (64bit) latest build.
Does not work with UPBGE 0.1.8.

that is strange now they work.