-
Posted by solidtux on Sat, 16 Aug 2008 19:19:38
Hi. I'm not sure if it's because I'm at interface 20400 or what, but it's not working for me. I downloaded the code when it didn't work for me when I typed everything from the book.
This is the error I get in-game:
[string "TargetTextFrame:OnLoad"]:1: attempt to index global 'TargetText' (a nil value)
-
Posted by solidtux on Sat, 16 Aug 2008 19:19:38
Hi. I'm not sure if it's because I'm at interface 20400 or what, but it's not working for me. I downloaded the code when it didn't work for me when I typed everything from the book.
This is the error I get in-game:
[string "TargetTextFrame:OnLoad"]:1: attempt to index global 'TargetText' (a nil value)
-
Posted by solidtux on Tue, 19 Aug 2008 16:06:40
Nevermind, I happened to look at someone else's XML file and found out what the problem was.
This was listed:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\UI.xsd">When it should have been this:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd"> -
Posted by morlando on Tue, 19 Aug 2008 16:18:16
That wouldn't have been the problem. The only thing that path affects would be a third party XML validation tool or editor. You must've "accidentally" fixed the real problem when you made that change. (perhaps you didn't exit the game completely before adding the XML file to the folder?)
-
Posted by mrbryo on Wed, 21 Jan 2009 22:52:53
I have received the same error...
Date: 2009-01-21 20:42:29
ID: 2
Error occured in: Global
Count: 1
Message: [string "TargetTextFrame:OnShow"] line 1:
attempt to index global 'TargetText' (a nil value)
Debug:
[C]: ?
[string "*:OnShow"]:1:
[string "*:OnShow"]:1
AddOns:
Swatter, v5.1.3715 (SnaggleTooth)
TargetText, v1
(ck=35)I copied the latest TargetText.lua from the zip posted on the site and recieved the error. I assume it has to do with the line...
TargetText = {}
I'm just beginning to learn so I'm not sure what is wrong. I'd remove it but I believe it is necessary (namespace?). I will continue to try and figure it out but help is always appreciated. I will post the fix if I figure it out.
Thanks
-
Posted by mrbryo on Wed, 21 Jan 2009 23:56:50
Sorry, after reviewing the original posters message I noticed he reported the error occuring in a different event. Mine occurs in OnShow and his occurs in OnLoad. I was able to trigger the error in the OnLoad event I think by only removing the set up for OnShow. Tried for another hour by going over chapter 13 again and nothing so I'm giving up for tonight.
-
Posted by jnwhiteh on Thu, 22 Jan 2009 02:46:55
If you are getting an error where it says that TargetText isn't defined.. then the TargetText.lua file isn't loading or it has an error that is stopping it from loading. Have you checked your .toc file to ensure its listed there?
-
Posted by mrbryo on Thu, 22 Jan 2009 21:03:36
I feel like a noob! It was the toc file. I had TargetText.lua listed after the TargetText.xml instead of...
TargetText.lua
TargetText.xmlOnce I did that change it worked! So much for my reading skill; page 187 says...
...it should load TargetText.lua and TargetText.xml in that order.
Thanks for the help.