매크로 게시판

전체보기

모바일 상단 메뉴

본문 페이지

[공통] 기본 네임플레이트에 체력퍼센트 표시되게 하려는데..

nhck1j2
댓글: 4 개
조회: 2205
2017-07-10 23:39:48
CreateFrame('frame'):SetScript('OnUpdate', function(self, elapsed)
  for index = 1, select('#', WorldFrame:GetChildren()) do
        local f = select(index, WorldFrame:GetChildren())
        if f:GetName() and f:GetName():find('NamePlate%d') then
          f.h = select(1, select(1, f:GetChildren()):GetChildren())
          if f.h then
         if not f.h.v then
           f.h.v = f.h:CreateFontString(nil, "ARTWORK") 
           f.h.v:SetPoint("RIGHT")
           f.h.v:SetFont(STANDARD_TEXT_FONT, 9, 'OUTLINE')
         else
           local _, maxh = f.h:GetMinMaxValues()
           local val = f.h:GetValue()
           f.h.v:SetText(string.format(math.floor((val/maxh)*100)).." %")
         end
          end
        end
  end
end)


무거운 다른 기능들도 있는 애드온 안쓰고 딱 기본 네임플레이트에 현재 체력퍼센트만 표시되게끔 해서 쓰려고 합니다.
그래서 위에 처럼 해서 애드온으로 적용시키면 예전엔 문제가 없었는데, 최근에는 인던만 들어가면 in function `GetName' 무한에러가 뜹니다..
 어떻게 수정하면 에러 없이 제대로 쓸 수 있을까요? 도와주실 수 있는 분 계세요?

Lv27 nhck1j2

모바일 게시판 하단버튼

댓글

새로고침
새로고침

모바일 게시판 하단버튼

지금 뜨는 인벤

더보기+

모바일 게시판 리스트

모바일 게시판 하단버튼

글쓰기

모바일 게시판 페이징

최근 HOT한 콘텐츠

  • 와우
  • 게임
  • IT
  • 유머
  • 연예