def showtalk (self,[color=blue] instance):
pos =self.map3dToAspect2d(render,[color=blue]instance.dummy.getPos())
text =instance.chat
currentTime = [color=orange]task.time - timeOffset
if currentTime >= 0.05 :
instance.Timefag += 1
timeOffset = task.time
if instance.Timefag <5:
if pos==None:
text.hide()
else:
text.show()
text['pos']=(pos[0],pos[2]+0.1)
return Task.cont
then it show error like this
[color=red]Global name ‘task’ is not defind
and when i use this
def showtalk (self,[color=blue]task, instance):
then it show error like this
[color=red]showtalk() takes exactly 3 arguments (2 given)
how can i do?
if i want to use task.time and extraArgs