Seru Posted April 26, 2014 Report Share Posted April 26, 2014 Buenas, estaba intentando quitar la imagen de estado del caballo y me surgieron errores, asi que decidí poner todo de nuevo, pero sigue saltando un error. Me gustaría que me dijesen todo lo que debo quitar y cómo solucionar ésto, ya que creo que no deje nada por poner. 0426 19:41:55465 :: Traceback (most recent call last):0426 19:41:55474 :: File "game.py", line 2325, in BINARY_ServerCommand_Run0426 19:41:55474 :: File "stringCommander.py", line 63, in Run0426 19:41:55475 :: File "stringCommander.py", line 31, in __call__0426 19:41:55475 :: File "stringCommander.py", line 20, in __call__0426 19:41:55475 :: File "game.py", line 2402, in __Horse_UpdateState0426 19:41:55475 :: AttributeError0426 19:41:55475 :: : 0426 19:41:55475 :: 'AffectShower' object has no attribute 'SetHorseState'0426 19:41:55475 :: 0426 19:41:55475 :: Unknown Server Command horse_state 21 3 3 | horse_state Esto es lo que salta ahora Link to comment Share on other sites More sharing options...
LovePlay Posted April 26, 2014 Report Share Posted April 26, 2014 En game.py en def __ServerCommand_Build(self): serverCommandList={ Dice que no encuentra esto : "horse_state" : self.__Horse_UpdateState, "hide_horse_state" : self.__Horse_HideState, Seru 1 Link to comment Share on other sites More sharing options...
Seru Posted April 26, 2014 Author Report Share Posted April 26, 2014 El problema es que está puesto y sigue saliendo ese error y ya no sé de dónde se queja esto xD Link to comment Share on other sites More sharing options...
Shogun Posted April 26, 2014 Report Share Posted April 26, 2014 Te falta esto en uiAffectShower.py def SetHorseState(self, level, health, battery): if level==0: self.horseImage=None else: image = HorseImage() image.SetParent(self) image.SetState(level, health, battery) image.Show() self.horseImage=image self.__ArrangeImageList() Debe ir debajo de esta linea: self.lovePointImage.OnUpdateLovePoint(lovePoint) y antes de esta def SetPlayTime(self, playTime): Seru 1 Link to comment Share on other sites More sharing options...
LovePlay Posted April 26, 2014 Report Share Posted April 26, 2014 Te falta esto en uiAffectShower.py def SetHorseState(self, level, health, battery): if level==0: self.horseImage=None else: image = HorseImage() image.SetParent(self) image.SetState(level, health, battery) image.Show() self.horseImage=image self.__ArrangeImageList() Debe ir debajo de esta linea: self.lovePointImage.OnUpdateLovePoint(lovePoint) y antes de esta def SetPlayTime(self, playTime): xDDDD, justo estaba escribiendo esto y me sale 1 nuevo comentario, hago reload y sale lo mismo que yo iva a poner e.e xd Porque me salte lo de 0426 19:41:55475 :: 'AffectShower' object has no attribute 'SetHorseState' Y digo a lo mejor le falta el def__SetHorseState. xdd Seru 1 Link to comment Share on other sites More sharing options...
Seru Posted April 26, 2014 Author Report Share Posted April 26, 2014 Te falta esto en uiAffectShower.py def SetHorseState(self, level, health, battery): if level==0: self.horseImage=None else: image = HorseImage() image.SetParent(self) image.SetState(level, health, battery) image.Show() self.horseImage=image self.__ArrangeImageList()Debe ir debajo de esta linea: self.lovePointImage.OnUpdateLovePoint(lovePoint) y antes de esta def SetPlayTime(self, playTime): CRACKLo tenía en otro orden...Ahora me falta saber como quitar esa imagen, es por una buena causa : $ Link to comment Share on other sites More sharing options...
LovePlay Posted April 26, 2014 Report Share Posted April 26, 2014 CRACKLo tenía en otro orden...Ahora me falta saber como quitar esa imagen, es por una buena causa : $ NOOO, YO QUERIA SER EL POPULAR CRACK!! DX Que imagen quieres quitar (?) Link to comment Share on other sites More sharing options...
Seru Posted April 26, 2014 Author Report Share Posted April 26, 2014 NOOO, YO QUERIA SER EL POPULAR CRACK!! DX Que imagen quieres quitar (?)No te quejes o te quito las gracias :cLa imagen que muestra el estado del caballo, ya que no quiero que muera siempre será verde y me gustaría quitar ese fantoche de ahí xDDebes iniciar sesión para ver el contenido del enlace en esta publicación. Link to comment Share on other sites More sharing options...
LovePlay Posted April 26, 2014 Report Share Posted April 26, 2014 No te quejes o te quito las gracias :c La imagen que muestra el estado del caballo, ya que no quiero que muera siempre será verde y me gustaría quitar ese fantoche de ahí xD Debes iniciar sesión para ver el contenido del enlace en esta publicación. Que facil, tienes que hacer lo siguiente: Abres uiaffectshower.py y buscas def OnMouseOverOut(self): self.toolTip.HideToolTip()# END_OF_WEDDING y debajo estara class HorseImage(ui.ExpandedImageBox): FILE_PATH = "d:/ymir work/ui/pattern/HorseState/" FILE_DICT = { 00 : FILE_PATH+"00.dds", 01 : FILE_PATH+"00.dds", 02 : FILE_PATH+"00.dds", 03 : FILE_PATH+"00.dds", 10 : FILE_PATH+"10.dds", 11 : FILE_PATH+"11.dds", 12 : FILE_PATH+"12.dds", 13 : FILE_PATH+"13.dds", 20 : FILE_PATH+"20.dds", 21 : FILE_PATH+"21.dds", 22 : FILE_PATH+"22.dds", 23 : FILE_PATH+"23.dds", 30 : FILE_PATH+"30.dds", 31 : FILE_PATH+"31.dds", 32 : FILE_PATH+"32.dds", 33 : FILE_PATH+"33.dds", } def __init__(self): ui.ExpandedImageBox.__init__(self) #self.textLineList = [] self.toolTip = uiToolTip.ToolTip(100) self.toolTip.HideToolTip() def __GetHorseGrade(self, level): if 0 == level: return 0 return (level-1)/10 + 1 def SetState(self, level, health, battery): #self.textLineList=[] self.toolTip.ClearToolTip() if level>0: try: grade = self.__GetHorseGrade(level) self.__AppendText(localeInfo.LEVEL_LIST[grade]) except IndexError: print "HorseImage.SetState(level=%d, health=%d, battery=%d) - Unknown Index" % (level, health, battery) return try: healthName=localeInfo.HEALTH_LIST[health] if len(healthName)>0: self.__AppendText(healthName) except IndexError: print "HorseImage.SetState(level=%d, health=%d, battery=%d) - Unknown Index" % (level, health, battery) return if health>0: if battery==0: self.__AppendText(localeInfo.NEEFD_REST) try: fileName=self.FILE_DICT[health*10+battery] except KeyError: print "HorseImage.SetState(level=%d, health=%d, battery=%d) - KeyError" % (level, health, battery) try: self.LoadImage(fileName) except: print "HorseImage.SetState(level=%d, health=%d, battery=%d) - LoadError %s" % (level, health, battery, fileName) self.SetScale(0.7, 0.7) def __AppendText(self, text): self.toolTip.AppendTextLine(text) self.toolTip.ResizeToolTip() #x=self.GetWidth()/2 #textLine = ui.TextLine() #textLine.SetParent(self) #textLine.SetSize(0, 0) #textLine.SetOutline() #textLine.Hide() #textLine.SetPosition(x, 40+len(self.textLineList)*16) #textLine.SetText(text) #self.textLineList.append(textLine) def OnMouseOverIn(self): #for textLine in self.textLineList: # textLine.Show() self.toolTip.ShowToolTip() def OnMouseOverOut(self): #for textLine in self.textLineList: # textLine.Hide() self.toolTip.HideToolTip() Borras todo eso.. Luego buscas def __init__(self): ui.Window.__init__(self) y debajo borras esto self.horseImage=None Luego buscas def ClearAllAffects(self): y debajo borras self.horseImage=None Despues busca def OnUpdateLovePoint(self, lovePoint): y el siguiente def lo borras osea este: def SetHorseState(self, level, health, battery): if level==0: self.horseImage=None else: image = HorseImage() image.SetParent(self) image.SetState(level, health, battery) image.Show() self.horseImage=image self.__ArrangeImageList() Despues busca: def __ArrangeImageList(self): y debajo borra esto: if self.horseImage: width+=self.IMAGE_STEP Que te quede asi esa parte: def __ArrangeImageList(self): width = len(self.affectImageDict) * self.IMAGE_STEP if self.lovePointImage: width+=self.IMAGE_STEP self.SetSize(width, 26) xPos = 0 Despues abajo, borras esto if self.horseImage: self.horseImage.SetPosition(xPos, 0) xPos += self.IMAGE_STEP Luego vamos a game.py y busca def __ServerCommand_Build(self): serverCommandList={ y debajo borra esto "horse_state" : self.__Horse_UpdateState, "hide_horse_state" : self.__Horse_HideState, Y buala!!!! Seru 1 Link to comment Share on other sites More sharing options...
Seru Posted April 26, 2014 Author Report Share Posted April 26, 2014 0426 22:13:55272 :: Unknown Server Command horse_state 21 3 3 | horse_state0426 22:13:58745 :: Unknown Server Command hide_horse_state | hide_horse_state No me quiere :c xD Link to comment Share on other sites More sharing options...
Shogun Posted April 26, 2014 Report Share Posted April 26, 2014 reemplaza esto que te puse antes def SetHorseState(self, level, health, battery): if level==0: self.horseImage=None else: image = HorseImage() image.SetParent(self) image.SetState(level, health, battery) image.Show() self.horseImage=image self.__ArrangeImageList() por esto def SetHorseState(self, level, health, battery): self.horseImage=None Seru and LovePlay 2 Link to comment Share on other sites More sharing options...
Seru Posted April 26, 2014 Author Report Share Posted April 26, 2014 reemplaza esto que te puse antes def SetHorseState(self, level, health, battery): if level==0: self.horseImage=None else: image = HorseImage() image.SetParent(self) image.SetState(level, health, battery) image.Show() self.horseImage=image self.__ArrangeImageList() por esto def SetHorseState(self, level, health, battery): self.horseImage=None Te voy a tener que hacer una estatua en mi habitación <3 #Solucionado Link to comment Share on other sites More sharing options...
Recommended Posts