nhck1j2
2017-07-10 23:39
조회: 2,211
추천: 0
기본 네임플레이트에 체력퍼센트 표시되게 하려는데..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' 무한에러가 뜹니다.. 어떻게 수정하면 에러 없이 제대로 쓸 수 있을까요? 도와주실 수 있는 분 계세요?
EXP
5,921
(80%)
/ 6,001
nhck1j2
|
인벤 공식 앱
댓글 알람 기능 장착! 최신 게임뉴스를 한 눈에 보자