Python Toontown投掷馅饼错误

Python Toontown投掷馅饼错误,python,panda3d,Python,Panda3d,我目前正在为现已关闭的迪士尼服务器开发一个私有服务器,但每当我的客户机抛出一个饼时,它就会崩溃并给我这个错误 File "toontown\toon\Toon.py", line 3029, in getTossPieInterval endPos=Point3(0, dist, 0), duration=time) TypeError: __init__() got an unexpected keyword argument 'startPos' Press any key to c

我目前正在为现已关闭的迪士尼服务器开发一个私有服务器,但每当我的客户机抛出一个饼时,它就会崩溃并给我这个错误

File "toontown\toon\Toon.py", line 3029, in getTossPieInterval
    endPos=Point3(0, dist, 0), duration=time)
TypeError: __init__() got an unexpected keyword argument 'startPos'
Press any key to continue . . .
以下是中断的代码

def getTossPieInterval(self, x, y, z, h, power, throwType, beginFlyIval = Sequence()):
    from toontown.toonbase import ToontownBattleGlobals
    from toontown.battle import BattleProps
    pie = self.getPieModel()
    flyPie = pie.copyTo(NodePath('a'))
    pieName = ToontownBattleGlobals.pieNames[self.pieType]
    pieType = BattleProps.globalPropPool.getPropType(pieName)
    animPie = Sequence()
    if pieType == 'actor':
        animPie = ActorInterval(pie, pieName, startFrame=48)
    sound = loader.loadSfx('phase_3.5/audio/sfx/AA_pie_throw_only.ogg')
    if throwType == ToontownGlobals.PieThrowArc:
        t = power / 100.0
        dist = 100 - 70 * t
        time = 1 + 0.5 * t
        proj = ProjectileInterval(None, startPos=Point3(0, 0, 0),
                                  endPos=Point3(0, dist, 0), duration=time)
        relVel = proj.startVel
    elif throwType == ToontownGlobals.PieThrowLinear:
        magnitude = power / 2. + 25

        relVel = Vec3(0, 1, 0.25)
        relVel.normalize()
        relVel *= magnitude

    def getVelocity(toon = self, relVel = relVel):
        return render.getRelativeVector(toon, relVel)

    toss = Track((0, Sequence(Func(self.setPosHpr, x, y, z, h, 0, 0), Func(pie.reparentTo, self.rightHand), Func(pie.setPosHpr, 0, 0, 0, 0, 0, 0), Parallel(ActorInterval(self, 'throw', startFrame=48), animPie), Func(self.loop, 'neutral'))), (16.0 / 24.0, Func(pie.detachNode)))
    fly = Track((14.0 / 24.0, SoundInterval(sound, node=self)), (16.0 / 24.0, Sequence(Func(flyPie.reparentTo, render), Func(flyPie.setScale, self.pieScale), Func(flyPie.setPosHpr, self, 0.52, 0.97, 2.24, 89.42, -10.56, 87.94), beginFlyIval, ProjectileInterval(flyPie, startVel=getVelocity, duration=3), Func(flyPie.detachNode))))
    return (toss, fly, flyPie)

我不熟悉此服务器或您正在使用的库,但该错误意味着ProjectleInterval构造函数不需要startPos关键字参数。如果您有该代码的源代码或文档,请仔细检查它需要的参数

它与panda3d有关。由于某些原因,它无法识别ProjectleInterval参数。如果需要,可以使用LerposInterval更改某些内容,但是,由于这使用了Velocity arg,LerposInterval将不起作用。也许尝试在toon.py的init中定义args,我不确定这是否可行,但可能会

您能显示异常的完整回溯吗?异常似乎引用了您的调用项目intervalnone,startPos=Point30,0,0,endPos=Point30,dist,0,duration=time。ProjectleInterval类来自哪里?