1. #1
    Deleted

    help needed to get addon working

    hi to everyone here on mmo-champion im very new when it comes to addons and im trying to get this addon working
    ive tested my lua in game with bug grabber and no errors but my xml file has 4 errors.
    well lets get to the code
    Code:
    <Ui
    	<Script file="WoWProFit.lua"/>
    	<Frame name="WoWProFit_MainFrame" parent="UIParent"
    			enableMouse="true"
    			moveable="true">
    		<Anchors>
    			<Anchor point="CENTER" />
    		</Anchors>
    		<Size>
    			<AbsDimension x="160" y="20" />
    		</Size>
    		<Backdrop	bgFile="Interface\Tooltips\UI-Tooltip-Background"
    					edgeFile="Interface\Tooltips\UI-Tooltip-Border"
    					tile="true">
    			<EdgeSize>
    				<AbsValue val="16" />
    			</EdgeSize>
    			<TileSize>
    				<AbsValue val="16" />
    			</TileSize>
    			<BackgroundInsets>
    				<AbsInset left="4" right="3" top="4" bottom="3" />
    			</BackgroundInsets>
    			<Color r="0.2" g="0.2" b="0.2" a="0.7" />
    		</Backdrop>
    		
    		<Frames>
    			<Button name="$parent_Button" />
    				<Size>
    					<AbsDimension x="15" y="15" />
    				</Size>
    				<Anchors>
    					<Anchor point="TOPLEFT">
    						<Offset>
    							<AbsDimension x="3" y="-3" />
    						</Offset>
    					</Anchor>
    				</Anchors>
    				<NormalTexture file="Interface\Minimap\TRACKING\OBJECTICONS">
    					<TexCoords left="0" right="0.125" top="0" bottom="0.5" />
    				</NormalTexture>
    				<HighlightTexture>
    					<Textcoords left="0.125" right="0.25" top="0" bottom="0.5" />
    				</HighlightTexture>
    				<Scripts>
    					<OnClick> 
    						WoWProFit_Button_OnClick();
    					</OnClick>
    				</Scripts>					
    			</Button>
    		</Frames>
    		
    		<Layers>
    			<Layer level="ARTWORK">
    				<FontString name="$parent_Goldstring"
    							inherits="SystemFont_Small"
    							text="0"
    							justifyV="TOP"
    							justifyH="RIGHT">
    					<Size>
    						<AbsDimention x="0" y="10" />
    					</Size>
    					<Anchors>
    						<Anchor point="TOPLEFT">
    							<Offset>
    								<AbsDimention x="20" y="-5" />
    							</Offset>
    						</Anchor>
    					</Anchors>
    					<color r="1" g="1" b="0" a="1" />
    				</FontString>
    			
    				<Texture	name="$parent_GoldTex"
    							file="Interface\MoneyFrame\UI-GoldIcon">
    					<Size>
    						<AbsDimention x="10" y="10" />
    					</Size>
    					<Anchors>
    						<Anchor point="TOPLEFT"
    								relativeTo="$parent_Goldstring"
    								relativePoint="TOPRIGHT">
    							<Offset>
    								<AbsDimention x="2" y="0" />
    							</Offset>
    						</Anchor>
    					</Anchors>
    				</Texture>
    				
    				<FontString name="$parent_SilverString"
    							inherits="SystemFont_Small"
    							text="0"
    							justifyV="TOP"
    							justifyH="RIGHT">
    					<Size>
    						<AbsDimention x="0" y="10" />
    					</Size>
    					<Anchors>
    						<Anchor point="TOPLEFT"
    								relativeTo="$paretnt_Goldtex"
    								relativePoint="TOPRIGHT">
    							<Offset>
    								<AbsDimention x="2" y="0" />
    							</Offset>
    						</Anchor>
    					</Anchors>
    					<Color r="1" g="1" b="0" a="1" />
    				</FontString>
    				
    				<Texture	name="$parent_SilverTex"
    							file="Interface\MoneyFrame\UI-SilverIcon">	
    					<Size>
    						<AbsDimention x="2" y="0" />
    					</Size>
    					<Anchors>
    						<Anchor point="TOPLEFT"
    								relativeTo="$parent_SilverString"
    								relativePoint="TOPRIGHT">
    							<Offset>
    								<AbsDimention x="2" y="0" />
    							</Offset>
    						</Anchor>
    					</Anchors>
    				</Texture>
    				
    				<FontString name="$parent_copperString"
    							inherits="SystemFont_Small"
    							text="0"
    							justifyV="TOP"
    							justifyH="RIGHT">
    					<Size>
    						<absDimension x="0" y="10" />
    					</Size>
    					<Anchors>
    						<Anchor point="TOPLEFT"
    								relativeTo="$parent_SilverTex"
    								relativePoint="TOPRIGHT">
    							<Offset>
    								<AbsDimentsion x="2" y="0" />
    							</Offset>
    						</Anchor>
    					</Anchors>
    					<color r="1" g="1" b="0" a="1" />
    				</FontString>
    				
    				<Texture	name="$parent_CopperTex"
    							file="Interface\MoneyFrame\UI-CopperIcon">
    					<Size>
    						<AbsDimension x="10" y="10" />
    					</Size>
    					<Anchors>
    						<Anchor point="TOPLEFT"
    								relative="$parent_CopperString"
    								relativePoint="TOPRIGHT">
    							<Offset>
    								<AbsDimension x="2" y="0" />
    							</Offset>
    						</Anchor>
    					</Anchors>
    				</Texture>
    			</Layer>
    		</Layers>
    		
    		<Scripts>
    			<OnLoad>
    				WoWProFit_OnLoad();
    			</OnLoad>
    			<OnEvent>
    				WoWProFit_OnEvent();
    			</OnEvent>
    			<OnMouseDown>
    				WoWProFit_OnMouseDown();
    			</OnMouseDown>
    			<OnMouseUp>
    				WoWProFit_OnMouseUp();
    			</OnMouseUp>
    		</Scripts>
    	</Frame>
    </Ui>
    i have 4 issues with this code

    first one is
    Line 53: parser error : Opening and ending tag mismatch: Frames line 30 and Button
    </Button>
    second
    Line 54: parser error : expected '>'
    </Frames>
    third
    Line 180: parser error : Opening and ending tag mismatch: Ui line 1 and Frame
    </Frame>
    and the last one
    Line 181: parser error : Extra content at the end of the document
    </Ui>



    ive had to remove some code at the top as it contained some web addresses and im not allowed to post them

    please any help with this would be brilliant
    also i want to add the function to this addon so it will show you what you have bought and sold during your play session any advice on this would be great fully recived

    if you need lua file let me know

  2. #2
    Deleted
    You do realize you don't have to use XML for your addons at all, right?

    Anyways, your <Ui> opener tag isn't complete.

  3. #3
    having a quick glance around line 28:


    <Button name="$parent_Button" />


    this opens and closes the button tag at once, before defining the rest of the button. Take out that extra / at the end of the tag as its closed further down your xml file

  4. #4
    Deleted
    Quote Originally Posted by Treeston View Post
    You do realize you don't have to use XML for your addons at all, right?

    Anyways, your <Ui> opener tag isn't complete.
    yes i do but it contained urls and i cant post them yet

  5. #5
    Quote Originally Posted by Treeston View Post
    You do realize you don't have to use XML for your addons at all, right?
    Quote Originally Posted by andypipkin View Post
    yes i do but it contained urls and i cant post them yet
    I think you misinterpreted what Treeston said. Just that for professional addon authors it's preferred to write everything in Lua instead of Lua and XML. It's fine if you posted the XML file if that's what you have to work with.

    Also this looks like it is someone elses addon in a how-to guide.

    http://wow-pro.com/general_guides/ja...riting_guide_0

    Gershuun @ Borean Tundra US - Interface & Macros Moderator

  6. #6
    Quote Originally Posted by lawomous View Post
    I think you misinterpreted what Treeston said. Just that for professional addon authors it's preferred to write everything in Lua instead of Lua and XML. It's fine if you posted the XML file if that's what you have to work with.

    Also this looks like it is someone elses addon in a how-to guide.

    http://wow-pro.com/general_guides/ja...riting_guide_0
    ahh yeah, then it seems the answers would also be on that page

  7. #7
    Deleted
    Quote Originally Posted by lawomous View Post
    I think you misinterpreted what Treeston said.
    He didn't. He replied to:
    Quote Originally Posted by Treeston View Post
    Anyways, your <Ui> opener tag isn't complete.

  8. #8
    Deleted
    Quote Originally Posted by lawomous View Post
    I think you misinterpreted what Treeston said. Just that for professional addon authors it's preferred to write everything in Lua instead of Lua and XML. It's fine if you posted the XML file if that's what you have to work with.

    Also this looks like it is someone elses addon in a how-to guide.

    yes the idea started from that guide but i will be adapting it once i get the basic addon working and in the guide he says you can adapt it and post as your own if you give credit to him what i want from this addon is the original feature of calculating profit/loss with the added feature of being able to call up how you made it eg lists of what was bought and sold

    *link removed from quote as i cant post links*

    ---------- Post added 2012-01-26 at 01:34 PM ----------

    Quote Originally Posted by stevietv View Post
    ahh yeah, then it seems the answers would also be on that page
    the guide was wrote for game version 30000 and im thinking something has changed as i have checked and rechecked the guide also i came to this conclusion from the amount of people who also had the same problems but ty for your imput

    ---------- Post added 2012-01-26 at 01:37 PM ----------

    also if anyone knows of any tutorials or help in learning how to do this without xml (dynamicly i beleave its called) i would be VERY great full or if someone would be willing to help with this addoni will credit for work done ty

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •