Quantcast WoWInterface - View Single Post - Map POI Tracking
View Single Post
06-25-15, 12:28 PM   #4
Choonstertwo
A Chromatic Dragonspawn
 
Choonstertwo's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2011
Posts: 194
Originally Posted by myrroddin View Post
Not sure about your question, but probably. I'm not actively playing WoW to test code.

However, I see an unnecessary global lookup, where you already have a local to do the job:
Lua Code:
  1. local poi = _G["WorldMapFramePOI"..i]
  2. local poiTexture = _G["WorldMapFramePOI"..i.."Texture"] -- right here
Replace with:
Lua Code:
  1. local poi = _G["WorldMapFramePOI"..i]
  2. local poiTexture = poi.."Texture"
Unless for some reason the texture lookup won't work in that manner?
Resike's code is getting the WorldMapFramePOI1 and WorldMapFramePOI1Texture objects, your code is getting the WorldMapFramePOI1 object and then attempting to concatenate that with the "Texture" string (which won't work).
  Reply With Quote