Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-22-05, 08:00 AM   #1
Mokaikai
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 5
Crashing to desktop. Clueless.

So a long time ago I created a mod based off dodgeding. Real simple mod. However recently I wanted to make it friendly for classes other than hunter. The basic premise is When a hunter dodges or parries they get a screen splash and audio signal they need to active mongoose bite or counter attack respectively. Since i was going through the steps to ensure it did nothing for other classes. I decided to add in functionality for warriors with overpower and rogues with disarm. However now this incredibly simple mod crashes to desktop whenever its triggered by event. I can't see why or how its not a very complex mod.

Any help would be greatly appreciated.

LUA script :

Code:
function MM_OnLoad()
	this:RegisterEvent("UNIT_COMBAT")
end

function MM_OnEvent(event)
	local playerClass, englishClass = UnitClass("player")
	if ( playerClass == "Hunter" ) then
		if (( event=="UNIT_COMBAT" ) and ( arg1=="player" ) and ( arg2=="DODGE" )) then
			PlaySoundFile("interface\\addons\\mongoosemania\\waves\\dodge.wav")
			MMMsgFrame:AddMessage(format("Mongoose Bite!"), 1, 1, 0, 1, 2)
		elseif (( event=="UNIT_COMBAT" ) and ( arg1=="player" ) and ( arg2=="PARRY" )) then
			PlaySoundFile("interface\\addons\\mongoosemania\\waves\\parry.wav")
			MMMsgFrame:AddMessage(format("Counter Attack!"), 1, 1, 0, 1, 2)
		end
	end
	if ( playerClass == "Warrior" ) then
		if (( event=="UNIT_COMBAT" ) and ( arg1=="target" ) and ( arg2=="DODGE" )) then
			PlaySoundFile("interface\\addons\\mongoosemania\\waves\\dodge.wav")
			MMMsgFrame:AddMessage(format("Overpower!"), 1, 1, 0, 1, 2)
		end
	end
	if ( playerClass == "Rogue" ) then
		if (( event=="UNIT_COMBAT" ) and ( arg1=="target" ) and ( arg2=="PARRY" )) then
			PlaySoundFile("interface\\addons\\mongoosemania\\waves\\parry.wav")
			MMMsgFrame:AddMessage(format("Disarm!"), 1, 1, 0, 1, 2)
		end
	end
end
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/">
	<Script file="MongooseMania.lua"/>
	<Frame name="MMAudioFrame">
		<Scripts>
			<OnLoad>
				MM_OnLoad()
			</OnLoad>			
		</Scripts>
	</Frame>
	<MessageFrame name="MMMsgFrame" insertMode="TOP" parent="UIParent" frameStrata="LOW" toplevel="true">
       	<Size>
			<AbsDimension x="512" y="60"/>
		</Size>
        	<Anchors>
				<Anchor point="CENTER">
					<Offset>
						<AbsDimension x="0" y="0"/>
					</Offset>
				</Anchor>
			</Anchors>
			<Scripts>
				<OnLoad>
					MM_OnLoad()
				</OnLoad>
				<OnEvent>
					MM_OnEvent(event, arg1, arg2)
				</OnEvent>
			</Scripts>		
		<FontString inherits="GameFontNormalHuge" justifyH="CENTER"/>
	</MessageFrame>	
</Ui>
WOW error:

This application has encountered a critical error:

ERROR #132 (0x85100084) Fatal Exception
Program: C:\Program Files\World of Warcraft\WoW.exe
Exception: 0xC0000005 (ACCESS_VIOLATION) at 001B:00739967

The instruction at "0x00739967" referenced memory at "0xFFFFFFFC".
The memory could not be "read".

Last edited by Mokaikai : 12-22-05 at 08:03 AM. Reason: Included wow error.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Crashing to desktop. Clueless.


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