Page MenuHome

KX_GameObject, not str ERROR!!!
Closed, InvalidPublic


Resolution: Fixed
Category: Animation system

Here's the link to the .blend. I don't have good
webspace so copy the link and paste it in a new
browser window.
If you can get the file, skip all the instructions
and go directly to read the last lines starting
from "Hit p and..." If it doesn't work, you can go
on ahead and recreate the problem, it shouldn't take
longer than 2 minutes.

Ok, to recreate the problem. Add 4 empties in a line
in layer 1, make sure they have a good amount of
space between them. In layer 2 add a two cubes and
name it, Box, Box0. Now go to the python script
window, create a new txt file and name it, Add, and
add this in.

import GameLogic

controller = GameLogic.getCurrentController()
owner = controller.getOwner()

#Lets you use that particular actuator
act = controller.getActuator("act")

GameLogic.addActiveActuator(act, 1)

Select the first empty and go to the logic bricks.
Under sensor add an always sensor with pulse mode
off. Under controllers add Python and type in Add as
the script name. Under Actuators add Edit Object and
make sure the actuator name is, act. Type in, Box,
as the name for the parameter OB. Now all 4 empties
will have the same logic so shift select the right 3
empties then shift select the 1st empty. Ctrl-C and
choose logic bricks.

Hit p and 2.34 will only add 2 boxes instead of 4.
In 2.33a and 2.25, the correct 4 boxes are added. In
2.34 the console window prints out

TypeError: argument 1 must be KX_GameObject, not str

I call this a bug in 2.34.

Jason Lin

Event Timeline

Kester Maddock (kester) changed the task status from Unknown Status to Unknown Status.Nov 6 2004, 12:09 PM

This task was automatically closed as archived as part of migration, because the project or tracker this task belonged to is no longer active.