Thread Tools Display Modes
01-02-18, 03:15 AM   #1
Gramrock_dev
A Kobold Labourer
Join Date: Jan 2018
Posts: 1
AceComm-2.0 Vanilla Development, I'm losing my hair, please help me !

Hey everyone,

I am going crazy here...

I want to write a Addon which shows a message in the chat window of my teammates, after a button is pushed. (like u can see in the picture)


Sounds simple right ? Well not really, after researching for 3 days now, i realized that wow Addon Documentation is pretty much the worst, especially Vanilla, since there are so many versions and expansions its impossible to find clear directions.

I found out that "SendAddonMessage" is the way to go (it got introduced to wow with 1.12.1. (it lets ur addon communicate with itself or other addons). But since the documentation is mostly for retail wow it's not possible to find a good way to work with it.

Then, finally i found out about Acecomm-2.0, which is basically everything clearly programmed and functioning (so one would think) in a dense library. AND there are even tutorials for it. (only 2 usable ones).

But now i keep getting the same errors and came to an absolute Halt, each tutorial causes a different error.

The one from their official site (https://wowace.gamepedia.com/AceComm-2.0_Tutorial) tells me that no matter which prefix i chose, it's already in use. as u can see here:



And if i cange it to whatever, it still stays the same.as u can see here:


I followed the tutorial step by step, here is my entire code so far:

.TOC
Code:
## Interface: 11200
## Title: SupBuddy
## Notes: My first AddOn to communicate

Libs\AceComm-2.0\AceComm-2.0.lua

SupBuddy.lua
SupBuddy.xml
.LUA
Code:
ChitChat = AceLibrary("AceAddon-2.0"):new("AceComm-2.0")
ChitChat:SetCommPrefix("SupBuddy")
function ChitChat:OnEnable()
    self:RegisterComm(self.commPrefix, "PARTY", "ReceiveMessage") -- note the use of the previously defined commPrefix here
end

function ChitChat:ReceiveMessage(prefix, sender, distribution, arg1, arg2, arg3, ...)
DEFAULT_CHAT_FRAME:AddMessage("test...")
end


function SupBuddyReact()
DEFAULT_CHAT_FRAME:AddMessage("YAY! It works!!")
end

function SupBuddySend()
self:SendCommMessage("PARTY", chit, chat, morechitchat)
end
And a simpme .XML
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">
  <Script File="SupBuddy.lua"/>

<!-- LAYOUT-->	
 <Frame name="SupBuddyFrame" movable="true" hidden="false">  
	<Size>
		<AbsDimension x="100" y="200"/>
	</Size>
	<Anchors>
		<Anchor point="CENTER"/>
	</Anchors>
	<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
		<BackgroundInsets>
			<AbsInset left="11" right="12" top="12" bottom="11"/>
			<Size>
				<AbsDimension x="128" y="17"/>
			</Size>
		</BackgroundInsets>
		<TileSize>
			<AbsValue val="32"/>
		</TileSize>
		<EdgeSize>
			<AbsValue val="32"/>
		</EdgeSize>
	</Backdrop>
		
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="SupBuddyFrameTitle" file="Interface\DialogFrame\UI-DialogBox-Header">
					<Size>
						<AbsDimension x="150" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="TOP">
							<Offset>
								<AbsDimension x="0" y="12"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
				<FontString inherits="GameFontNormal" text="SupBuddy">
					<Anchors>
						<Anchor point="TOP" relativeTo="SupBuddyFrame">
							<Offset>
								<AbsDimension x="0" y="-2"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		
<!-- BUTTON-->
		<Frames>
			<Button name="testbutton" inherits="OptionsButtonTemplate" text="test">
				<Size>
						<AbsDimension x="50" y="30"/>
				</Size>
				<Anchors>
					<Anchor point="TOP">
						<Offset x="0" y="-46"/>
					</Anchor> 
				</Anchors>
				<Scripts>
					<OnClick>
						SupBuddySend();
					</OnClick>
				</Scripts>
			</Button>
		</Frames>

<!-- MAKE MOVABLE-->
<Scripts>
       <OnMouseDown>
          this:StartMoving();
       </OnMouseDown>
       <OnMouseUp>
          this:StopMovingOrSizing();
       </OnMouseUp>
</Scripts>
			
 </Frame>
</Ui>
Is there ANYBODY out there who can help me ? i mean the code seems soo small, yet it seems impossible, what am I doing wrong?
I tried excluding every other library but AceComm-2.0, it still doesn't work.

Is the "SendAddonMessage" command disabled or blocked on Private servers (light's hope) ?

Can someone please help me.

Kind regards. Gram

Last edited by Gramrock_dev : 01-02-18 at 03:19 AM.
 
01-02-18, 05:06 AM   #2
SushiAce
A Murloc Raider
 
SushiAce's Avatar
Join Date: Mar 2017
Posts: 6
Dear OP, this forum does NOT support private servers and therefore the development of any addons for older versions of WoW.
 

WoWInterface » Developer Discussions » Lua/XML Help » AceComm-2.0 Vanilla Development, I'm losing my hair, please help me !

Thread Tools
Display Modes

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