Thread Tools Display Modes
09-19-05, 10:31 PM   #1
Numgrak
A Deviate Faerie Dragon
Join Date: Feb 2005
Posts: 13
Map Issue

Anytime I open the zone map an error shows up as soon as i close it again.

Interface\FrameXML\WorldMapFrame.lua:294:attempt to perform arithmetic on local `elapsed' (a nil value)

I've disabled any mod I have that could be related to the map but I'm still receiving this error. Anyone have some insight ?
  Reply With Quote
09-20-05, 09:18 AM   #2
Numgrak
A Deviate Faerie Dragon
Join Date: Feb 2005
Posts: 13
Found a thread on another forum indicating that updating MapNotes should fix this. Will test once servers are up again.
  Reply With Quote
09-20-05, 11:35 AM   #3
Numgrak
A Deviate Faerie Dragon
Join Date: Feb 2005
Posts: 13
Still happening after updating. Any comments please ?
  Reply With Quote
09-20-05, 02:41 PM   #4
Issis
A Defias Bandit
Join Date: Jul 2005
Posts: 3
I have have this problem, was talking to a friend and he gets the same code have disable all my map mods in hopes of finding the one that doesnt work but still comes up was wondering if this is a bug from the patch. Or am I just not finding the right one to disable I figure with arithmic value it would either be anything with the map coordinates or map notes, anyway was going to try one more my shim kill mod, do you by chance have that one enabled ?
  Reply With Quote
09-20-05, 03:46 PM   #5
Numgrak
A Deviate Faerie Dragon
Join Date: Feb 2005
Posts: 13
Dont have that mod sorry
  Reply With Quote
09-22-05, 04:43 PM   #6
Numgrak
A Deviate Faerie Dragon
Join Date: Feb 2005
Posts: 13
Well no other responses as of yet. I know we cant be the ONLY 2 people with this issue.
  Reply With Quote
09-25-05, 12:59 PM   #7
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
Sorry Numgrak, missed this one.

What map mods do you have?
__________________
“Do what you feel in your heart to be right — for you’ll be criticized anyway.” ~ Eleanor Roosevelt
~~~~~~~~~~~~~~~~~~~
Co-Founder & Admin: MMOUI
FaceBook Profile, Page, Group
Avatar Image by RaffaeleMarinetti
  Reply With Quote
09-25-05, 03:17 PM   #8
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
nothing is located in your FrameXML folder is it?
  Reply With Quote
09-25-05, 07:21 PM   #9
Numgrak
A Deviate Faerie Dragon
Join Date: Feb 2005
Posts: 13
Have the most updated versions of Atlas, Gatherer, CT_MapMod. Just started since the 1.7 patch.

Only thing in XML folder is the fonts.xml file.
Thanks for your responses and hope maybe you can offer a solution.
  Reply With Quote
09-25-05, 10:34 PM   #10
bburt
A Deviate Faerie Dragon
 
bburt's Avatar
Join Date: Aug 2005
Posts: 9
not sure if this will help

I'm not sure this will help because I don't remember the error I was getting back when it was happening...

But I think I had this error and it was due to my flights/flight paths mod, which was adding notes to the map.

Hope you can solve the problem...
  Reply With Quote
09-25-05, 10:41 PM   #11
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
Those are the *only* mods you have that have anything whatsoever to do with your map? And they are all current?

hrmmmm ...

Okay, what other mods are you running?
__________________
“Do what you feel in your heart to be right — for you’ll be criticized anyway.” ~ Eleanor Roosevelt
~~~~~~~~~~~~~~~~~~~
Co-Founder & Admin: MMOUI
FaceBook Profile, Page, Group
Avatar Image by RaffaeleMarinetti
  Reply With Quote
09-26-05, 06:01 AM   #12
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
The specific functions that causes your problem is as follows: (Specific error line is orange)
Code:
function WorldMapButton_OnUpdate(elapsed)
	local x, y = GetCursorPosition();
	x = x / this:GetScale();
	y = y / this:GetScale();

	local centerX, centerY = this:GetCenter();
	local width = this:GetWidth();
	local height = this:GetHeight();
	local adjustedY = (centerY + (height/2) - y ) / height;
	local adjustedX = (x - (centerX - (width/2))) / width;
	local name, fileName, texPercentageX, texPercentageY, textureX, textureY, scrollChildX, scrollChildY = UpdateMapHighlight( adjustedX, adjustedY );

	WorldMapFrame.areaName = name;
	if ( not WorldMapFrame.poiHighlight ) then
		WorldMapFrameAreaLabel:SetText(name);
	end
	if ( fileName ) then
		WorldMapHighlight:SetTexCoord(0, texPercentageX, 0, texPercentageY);
	    WorldMapHighlight:SetTexture("Interface\\WorldMap\\"..fileName.."\\"..fileName.."Highlight");
		textureX = textureX * width;
		textureY = textureY * height;
		scrollChildX = scrollChildX * width;
		scrollChildY = -scrollChildY * height;
		if ( (textureX > 0) and (textureY > 0) ) then
			WorldMapHighlight:SetWidth(textureX);
			WorldMapHighlight:SetHeight(textureY);
		 WorldMapHighlight:SetPoint("TOPLEFT", "WorldMapDetailFrame", "TOPLEFT", scrollChildX, scrollChildY);
			WorldMapHighlight:Show();
		    --WorldMapFrameAreaLabel:SetPoint("TOP", "WorldMapHighlight", "TOP", 0, 0);
		end
		
	else
		WorldMapHighlight:Hide();
	end
	--Position player
	UpdateWorldMapArrowFrames();
	local playerX, playerY = GetPlayerMapPosition("player");
	if ( playerX == 0 and playerY == 0 ) then
		ShowWorldMapArrowFrame(nil);
		WorldMapPing:Hide();
	else
		playerX = playerX * WorldMapDetailFrame:GetWidth();
		playerY = -playerY * WorldMapDetailFrame:GetHeight();
		PositionWorldMapArrowFrame("CENTER", "WorldMapDetailFrame", "TOPLEFT", playerX, playerY);
		ShowWorldMapArrowFrame(1);

		-- Position clear button to detect mouseovers
		WorldMapPlayer:SetPoint("CENTER", "WorldMapDetailFrame", "TOPLEFT", playerX, playerY);

		-- Position player ping if its shown
		if ( WorldMapPing:IsVisible() ) then
		 WorldMapPing:SetPoint("CENTER", "WorldMapDetailFrame", "TOPLEFT", playerX-7, playerY-9);
			-- If ping has a timer greater than 0 count it down, otherwise fade it out
			if ( WorldMapPing.timer > 0 ) then
				WorldMapPing.timer = WorldMapPing.timer - elapsed;
				if ( WorldMapPing.timer <= 0 ) then
					WorldMapPing.fadeOut = 1;
		 		WorldMapPing.fadeOutTimer = MINIMAPPING_FADE_TIMER;
				end
			elseif ( WorldMapPing.fadeOut ) then
		 	WorldMapPing.fadeOutTimer = WorldMapPing.fadeOutTimer - elapsed;
				if ( WorldMapPing.fadeOutTimer > 0 ) then
		 		WorldMapPing:SetAlpha(255 * (WorldMapPing.fadeOutTimer/MINIMAPPING_FADE_TIMER))
				else
					WorldMapPing.fadeOut = nil;
					WorldMapPing:Hide();
				end
			end
		end
	end

	--Position groupmates
	local partyX, partyY, partyMemberFrame;
	local playerCount = 0;
	if ( GetNumRaidMembers() > 0 ) then
		for i=1, MAX_PARTY_MEMBERS do
			partyMemberFrame = getglobal("WorldMapParty"..i);
			partyMemberFrame:Hide();
		end
		for i=1, MAX_RAID_MEMBERS do
			partyX, partyY = GetPlayerMapPosition("raid"..i);
			partyMemberFrame = getglobal("WorldMapRaid"..playerCount + 1);
			if ( (partyX ~= 0 or partyY ~= 0) and not UnitIsUnit("raid"..i, "player") ) then
				partyX = partyX * WorldMapDetailFrame:GetWidth();
				partyY = -partyY * WorldMapDetailFrame:GetHeight();
		 	partyMemberFrame:SetPoint("CENTER", "WorldMapDetailFrame", "TOPLEFT", partyX, partyY);
				partyMemberFrame.name = nil;
				partyMemberFrame:Show();
				playerCount = playerCount + 1;
			end
		end
	else
		for i=1, MAX_PARTY_MEMBERS do
			partyX, partyY = GetPlayerMapPosition("party"..i);
			partyMemberFrame = getglobal("WorldMapParty"..i);
			if ( partyX == 0 and partyY == 0 ) then
				partyMemberFrame:Hide();
			else
				partyX = partyX * WorldMapDetailFrame:GetWidth();
				partyY = -partyY * WorldMapDetailFrame:GetHeight();
		 	partyMemberFrame:SetPoint("CENTER", "WorldMapDetailFrame", "TOPLEFT", partyX, partyY);
				partyMemberFrame:Show();
			end
		end
	end
	-- Position Team Members
	local numTeamMembers = GetNumBattlefieldPositions();
	for i=playerCount+1, MAX_RAID_MEMBERS do
		partyX, partyY, name = GetBattlefieldPosition(i - playerCount);
		partyMemberFrame = getglobal("WorldMapRaid"..i);
		if ( partyX == 0 and partyY == 0 ) then
			partyMemberFrame:Hide();
		else
			partyX = partyX * WorldMapDetailFrame:GetWidth();
			partyY = -partyY * WorldMapDetailFrame:GetHeight();
		 partyMemberFrame:SetPoint("CENTER", "WorldMapDetailFrame", "TOPLEFT", partyX, partyY);
			partyMemberFrame.name = name;
			partyMemberFrame:Show();
		end
	end

	-- Position flags
	local flagX, flagY, flagToken, flagFrame, flagTexture;
	local numFlags = GetNumBattlefieldFlagPositions();
	for i=1, numFlags do
		flagX, flagY, flagToken = GetBattlefieldFlagPosition(i);
		flagFrame = getglobal("WorldMapFlag"..i);
		flagTexture = getglobal("WorldMapFlag"..i.."Texture");
		if ( flagX == 0 and flagY == 0 ) then
			flagFrame:Hide();
		else
			flagX = flagX * WorldMapDetailFrame:GetWidth();
			flagY = -flagY * WorldMapDetailFrame:GetHeight();
		 flagFrame:SetPoint("CENTER", "WorldMapDetailFrame", "TOPLEFT", flagX, flagY);
			flagTexture:SetTexture("Interface\\WorldStateFrame\\"..flagToken);
			flagFrame:Show();
		end
	end
	for i=numFlags+1, NUM_WORLDMAP_FLAGS do
		flagFrame = getglobal("WorldMapFlag"..i);
		flagFrame:Hide();
	end

	-- Position corpse
	local corpseX, corpseY = GetCorpseMapPosition();
	if ( corpseX == 0 and corpseY == 0 ) then
		WorldMapCorpse:Hide();
	else
		corpseX = corpseX * WorldMapDetailFrame:GetWidth();
		corpseY = -corpseY * WorldMapDetailFrame:GetHeight();
		
		WorldMapCorpse:SetPoint("CENTER", "WorldMapDetailFrame", "TOPLEFT", corpseX, corpseY);
		WorldMapCorpse:Show();
	end

end
This involves a change in the way that players are located since version 1.7 and specifically how you are located on the map and the location shown.

Of the mods that you listed, only one of them affects this function in any way.

CT_MapMod hooks and replaces the function with the following:
Code:
CT_Hooked_WorldMapButton_OnUpdate = WorldMapButton_OnUpdate;
function CT_WorldMapButton_OnUpdateHook(arg)
	CT_Hooked_WorldMapButton_OnUpdate(arg);
	local i, y = 0;


	if ( not CT_UserMap_Notes[WorldMapZoneDropDownText:GetText()] ) then
		for i = 1, CT_NUM_USERMAP_NOTES, 1 do
			getglobal("CT_UserMap_Note" .. i):Hide();
		end
		CT_NumNotes:SetText("Map Notes: |c00FFFFFF0|r/|c00FFFFFF250|r");
		return;
	end

	-- Calculate what notes to show
	local y = 1;
	for i, var in CT_UserMap_Notes[WorldMapZoneDropDownText:GetText()] do
		if ( y > CT_NUM_USERMAP_NOTES ) then
			break;
		end		
		if ( not CT_MapMod_Options[UnitName("player") .. "@" .. GetCVar("realmName")].hideGroups[CT_MAPMOD_SETS[(var.set or 1)]] and ( not CT_MapMod_Filter or string.find(strlower(var.name), strlower(CT_MapMod_Filter)) or string.find(strlower(var.descript), strlower(CT_MapMod_Filter)) ) ) then
			local note = getglobal("CT_UserMap_Note" .. y);
			local IconTexture = getglobal("CT_UserMap_Note" .. y .."Icon");
			
			if ( var.set == 7 or var.set == 8 ) then
				local offset = 0;
				if ( var.set == 8 ) then
					offset = 29;
				end
				if ( CT_UserMap_HerbIcons[var.icon+offset] ) then
		 	 IconTexture:SetTexture("Interface\\AddOns\\CT_MapMod\\Resource\\" .. CT_UserMap_HerbIcons[var.icon+offset]);
				else
		 	 IconTexture:SetTexture("Interface\\AddOns\\CT_MapMod\\Resource\\Herb_Bruiseweed");
				end
			else
		 IconTexture:SetTexture("Interface\\AddOns\\CT_MapMod\\Skin\\" .. CT_UserMap_Icons[var.set]);
			end
		 note:SetPoint("CENTER", "WorldMapDetailFrame", "TOPLEFT", var.x*WorldMapButton:GetWidth(), -var.y*WorldMapButton:GetHeight()); 		
			note:Show();
			
			if ( not var.name ) then var.name = ""; end
			if ( not var.set or not CT_MAPMOD_SETS[var.set] ) then var.set = 1; end
			if ( not var.descript ) then var.descript = ""; end
	
			note.name = var.name;
			note.set = CT_MAPMOD_SETS[var.set];
			note.descript = var.descript;
			note.id = i;
			note.x = var.x;
			note.y = var.y;
			y = y + 1;
		end
	end
	CT_NumNotes:SetText("Map Notes: |c00FFFFFF" .. y-1 .. "|r/|c00FFFFFF250|r");
	for i = y, CT_NUM_USERMAP_NOTES, 1 do
		getglobal("CT_UserMap_Note" .. i):Hide();
	end
end
WorldMapButton_OnUpdate = CT_WorldMapButton_OnUpdateHook;
You might look at your version for that particular addon and make sure it is up to date, and barring that possibly post in the CTmod section of the forums for assistance.

Not surprisingly, that section of code changed signifigantly in version 1.7 as seen here (lines 240 - 395) http://wdn.wowinterface.com/module/F...nReport98.html

Last edited by Beladona : 09-26-05 at 06:18 AM.
  Reply With Quote
09-26-05, 09:05 AM   #13
Numgrak
A Deviate Faerie Dragon
Join Date: Feb 2005
Posts: 13
Thank you all for your help. After going thru the suggestions I found that I had overlooked updating my FlightMap mod since this latest patch. Once I had done so the error issue resolved itself. Thank you all again for your help on this
  Reply With Quote
09-26-05, 09:44 AM   #14
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
yeah that was not one of the ones you listed as having installed, or I would have checked it as well... oh well
  Reply With Quote
09-27-05, 04:48 PM   #15
bburt
A Deviate Faerie Dragon
 
bburt's Avatar
Join Date: Aug 2005
Posts: 9
You're Welcome!

You're welcome and I'm glad that you were able to figure it out... I think I just got lucky that it was my note that helped out. Especially considering that others spent more time on it than I did and also seemed to have read your posts more carefully than I. Good thing I didn't though because I might not have mentioned what I did if I'd read that you only had certain mods installed.

Anyways, good fortune and happy gaming!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Map Issue


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