View Single Post
09-27-23, 01:28 PM   #6
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,903
Depending on what you want to do but adjusting the start number seems to defeat the purpose of the loop

either just:
Lua Code:
  1. local text = MyGameTooltipTextRight2:GetText()
  2. if text then
  3.     print(text)
  4. end

or, if there might be something you want in position 1 or position x, check all TextRights:
Lua Code:
  1. local n = 1 --start from 1
  2. while _G["MyGameTooltipTextRight"..n] do
  3.    local text = _G["MyGameTooltipTextRight"..n]:GetText()
  4.    if text then
  5.        print(n, text)
  6.    end
  7.    n = n + 1
  8. end
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote