Thread Tools Display Modes
11-26-08, 05:02 PM   #1
kamcknig
A Murloc Raider
Join Date: Jul 2007
Posts: 5
Cant' load my lua file

Creating an incredibly simple thing here... or so I thought.

Here is my .toc file
Code:
##Interface: 30000
##Title: MiniMapCoords
##Notes: This AddOn will add your coordinates underneath the minimap.

MiniMapCoords.lua
MiniMapCoords.xml
and my .lua file:
Code:
function MiniMapCoords_OnLoad(frame)
    ChatFrame1:AddMessage("MiniMapCoords Initialized!");
end
and my .xml file
Code:
<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">

<Frame name="MiniMapCoords" parent="UIParent">
	<Size x="100" y="25" />
	<Anchors>
		<Anchor point="TOP" relativeTo="Minimap" relativePoint="BOTTOM" setAllPoints="true">
			<Offset x="0" y="-20" />
		</Anchor>
	</Anchors>
	<Layers>
		<Layer level="BACKGROUND">
			<Texture name="$parentBGColor">
				<Color r="0.5" g="0.5" b="0.5" a="0.75" />
			</Texture>
			<FontString name="$parentCoords" setAllPoints="true" justifyV="MIDDLE" justifyH="CENTER" inherits="GameFontNormal" text="Test!" />
		</Layer>
	</Layers>
	<Scripts>
		<OnLoad>
			MiniMapCoords_OnLoad(self);
		</OnLoad>
	</Scripts>
</Frame>

</Ui>
But I'm getting an error in the log/FrameXML.log that says:
"Error loading Interface\AddOns\MiniMapCoords\MiniMapCoords.lua"

Anyon know what is going on?

Last edited by kamcknig : 11-26-08 at 05:06 PM.
  Reply With Quote
11-26-08, 05:07 PM   #2
Psoewish
A Scalebane Royal Guard
 
Psoewish's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 447
I wish I could help, but XML seems to make my head spin. >.<
  Reply With Quote
11-26-08, 05:09 PM   #3
kamcknig
A Murloc Raider
Join Date: Jul 2007
Posts: 5
As far as I can tell the error seems to be either in my .toc file or my .lua file. I actually have the frame showing correctly. It just won't load my lua file and run the script to show the message in the main chat window.
  Reply With Quote
11-26-08, 06:38 PM   #4
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
Are you sure that your .lua file doesn't have a typo in the name? :P
  Reply With Quote
11-27-08, 07:43 AM   #5
kamcknig
A Murloc Raider
Join Date: Jul 2007
Posts: 5
Absolutely sure, I even renamed it to Test.lua just to see.

I did get this working. I have no idea how though. Everythign seems to look the same as what I posted, except it works now! ugh oh well
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Cant' load my lua file


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off