If I use this code:
def createBehavior(self, u):
n = u.getNetTag("id")
self.aiChar = AICharacter(n, u, 50, 0.05, 15)
self.aiWorld.addAiChar(self.aiChar)
self.aiBehavior = self.aiChar.getAiBehaviors()
self.aiBehavior.initPathFind("navmesh.csv")
self.ais.append(self.aiBehavior)
I get this error:
Assertion failed: !is_empty() at line 1834 of panda/src/pgraph/nodePath.cxx
couldnt find source
Traceback (most recent call last):
File "C:\Panda3D-1.7.2\direct\showbase\EventManager.py", line 61, in eventLoop
Task
self.doEvents()
File "C:\Panda3D-1.7.2\direct\showbase\EventManager.py", line 55, in doEvents
processFunc(self.eventQueue.dequeueEvent())
File "C:\Panda3D-1.7.2\direct\showbase\EventManager.py", line 124, in processE
vent
messenger.send(eventName)
File "C:\Panda3D-1.7.2\direct\showbase\Messenger.py", line 388, in send
self.__dispatch(acceptorDict, event, sentArgs, foundWatch)
File "C:\Panda3D-1.7.2\direct\showbase\Messenger.py", line 473, in __dispatch
method (*(extraArgs + sentArgs))
File "mainPanda.py", line 111, in Go
ai.pathFindTo(p)
AssertionError: !is_empty() at line 1834 of panda/src/pgraph/nodePath.cxx
:task(error): Exception occurred in PythonTask eventManager
Traceback (most recent call last):
File "mainPanda.py", line 157, in <module>
run()
File "C:\Panda3D-1.7.2\direct\showbase\ShowBase.py", line 2630, in run
self.taskMgr.run()
File "C:\Panda3D-1.7.2\direct\task\Task.py", line 502, in run
self.step()
File "C:\Panda3D-1.7.2\direct\task\Task.py", line 460, in step
self.mgr.poll()
File "C:\Panda3D-1.7.2\direct\showbase\EventManager.py", line 61, in eventLoop
Task
self.doEvents()
File "C:\Panda3D-1.7.2\direct\showbase\EventManager.py", line 55, in doEvents
processFunc(self.eventQueue.dequeueEvent())
File "C:\Panda3D-1.7.2\direct\showbase\EventManager.py", line 124, in processE
vent
messenger.send(eventName)
File "C:\Panda3D-1.7.2\direct\showbase\Messenger.py", line 388, in send
self.__dispatch(acceptorDict, event, sentArgs, foundWatch)
File "C:\Panda3D-1.7.2\direct\showbase\Messenger.py", line 473, in __dispatch
method (*(extraArgs + sentArgs))
File "mainPanda.py", line 111, in Go
ai.pathFindTo(p)
AssertionError: !is_empty() at line 1834 of panda/src/pgraph/nodePath.cxx
And if I use this code:
def select(self, n):
a = 0
self.u = None
while a != len(self.units):
if self.units[a].getNetTag("id") == n:
self.u = self.units[a]
a = a + 1
if self.u != None:
self.aiChar = AICharacter(n, self.u, 50, 0.05, 15)
self.aiWorld.addAiChar(self.aiChar)
self.aiBehavior = self.aiChar.getAiBehaviors()
self.aiBehavior.initPathFind("navmesh.csv")
I get this error:
Assertion failed: !is_empty() at line 1333 of panda/src/pgraph/nodePath.cxx
Assertion failed: !is_empty() at line 1834 of panda/src/pgraph/nodePath.cxx
Assertion failed: !is_empty() at line 1258 of panda/src/pgraph/nodePath.cxx
Assertion failed: !is_empty() at line 1685 of panda/src/pgraph/nodePath.cxx
Assertion failed: !is_empty() at line 1408 of panda/src/pgraph/nodePath.cxx
Assertion failed: !is_empty() at line 1373 of panda/src/pgraph/nodePath.cxx
Assertion failed: !is_empty() at line 1408 of panda/src/pgraph/nodePath.cxx
Assertion failed: !is_empty() at line 1383 of panda/src/pgraph/nodePath.cxx
Assertion failed: !is_empty() at line 1408 of panda/src/pgraph/nodePath.cxx
Assertion failed: !is_empty() at line 1393 of panda/src/pgraph/nodePath.cxx
Traceback (most recent call last):
File "mainPanda.py", line 126, in aiUpdate
self.aiWorld.update()
AssertionError: !is_empty() at line 1333 of panda/src/pgraph/nodePath.cxx
:task(error): Exception occurred in PythonTask UPDATEAI
Traceback (most recent call last):
File "mainPanda.py", line 155, in <module>
run()
File "C:\Panda3D-1.7.2\direct\showbase\ShowBase.py", line 2630, in run
self.taskMgr.run()
File "C:\Panda3D-1.7.2\direct\task\Task.py", line 502, in run
self.step()
File "C:\Panda3D-1.7.2\direct\task\Task.py", line 460, in step
self.mgr.poll()
File "mainPanda.py", line 126, in aiUpdate
self.aiWorld.update()
AssertionError: !is_empty() at line 1333 of panda/src/pgraph/nodePath.cxx