PDA

View Full Version : Lua Error 'yTarget' (a nil value)


Keal
14-05-2008, 12:57 PM
Hi

I was wondering if there were enything I could do to fix this error?

Getting the error; "attempt to perform arithmetic on field 'yTarget' (a nil value)"

Is there any quick fix to this, or does the entire addon have to be rewritten ?

Thanks in advance for the help

Tunga
14-05-2008, 03:18 PM
What addon?

Keal
14-05-2008, 03:28 PM
What addon?

This is a really old one, BhaldieMoveIT

http://wowui.worldofwar.net/?p=mod&m=688

This is the only addon I've found that keeps the old bag skin, and still lets me move them as they are. In combat even, wich is why I can't use MoveAnything for my bags.

Tunga
14-05-2008, 05:11 PM
Well it could be a quick fix, what context is yPlayer being used in? If you can identify why its value is nil then you may be able to see what's wrong with it.

If the above makes no sense then the answer is probably that you can't fix it. I'd be surprised if no other mod can move the bag frames around (though I thought they were protected in combat?).

Keal
14-05-2008, 05:23 PM
Well it could be a quick fix, what context is yPlayer being used in? If you can identify why its value is nil then you may be able to see what's wrong with it.

If the above makes no sense then the answer is probably that you can't fix it. I'd be surprised if no other mod can move the bag frames around (though I thought they were protected in combat?).

Its related to the pet bar, when I mount/dismount I get the error. Other then that, I have no clue. Don't know any LUA, so I can't really do much myself.

I did try to fix it by removing the pet bar from the addon all together, but this caused and unexpected bug, where I at chess event don't get a pet bar for controlling the NPCs.

If theres some other addon that enables me to move all bags, bank included, without messing them up, I'd love to know.

Keal
14-05-2008, 05:33 PM
This is where the "yTarget" function is in the Lua, if anyone know whats wrong here, I'd be very thankfull for the help.

function BM_PetActionBarFrame_OnUpdate(elapsed)
local yPos;
if ( this.slideTimer and (this.slideTimer < this.timeToSlide) ) then
SlidingActionBarTexture0:Hide();
SlidingActionBarTexture1:Hide();
this.completed = nil;
if ( this.mode == "show" ) then
yPos = (this.slideTimer/this.timeToSlide) * this.yTarget;
this:SetPoint("TOPLEFT", this:GetParent(), "BOTTOMLEFT", PETACTIONBAR_XPOS, yPos);
this.state = "showing";
this:Show();
elseif ( this.mode == "hide" ) then
yPos = (1 - (this.slideTimer/this.timeToSlide)) * this.yTarget;
this:SetPoint("TOPLEFT", this:GetParent(), "BOTTOMLEFT", PETACTIONBAR_XPOS, yPos);
this.state = "hiding";
end
this.slideTimer = this.slideTimer + elapsed;
else
SlidingActionBarTexture0:Hide();
SlidingActionBarTexture1:Hide();
this.completed = 1;
if ( this.mode == "show" ) then
this:SetPoint("TOPLEFT", this:GetParent(), "BOTTOMLEFT", PETACTIONBAR_XPOS, this.yTarget);
this.state = "top";
--Move the chat frame and edit box up a bit
elseif ( this.mode == "hide" ) then
this:SetPoint("TOPLEFT", this:GetParent(), "BOTTOMLEFT", PETACTIONBAR_XPOS, 0);
this.state = "bottom";
this:Hide();
--Move the chat frame and edit box back down to original position
end
this.mode = "none";
end
end

Tunga
14-05-2008, 05:38 PM
Looks like PetActionBarframe used to have a field yTarget which no longer exists. Some change blizzard made I guess.

Iceshard
14-05-2008, 09:10 PM
I use baggins.

Keal
14-05-2008, 09:20 PM
I've tried Baggins, but doesn't that addon group your bags into one big one ? Maybe I didn't try it out enough. I'll check it again.

Keal
14-05-2008, 10:52 PM
Just checked Baggins again. This addon does nothing to the Standard Blizzard Bags, it just adds new ones to configure.

So anyone know about an addon that moves the Blizzard Bags, without to much other stuff ?

Iceshard
16-05-2008, 08:33 PM
Just checked Baggins again. This addon does nothing to the Standard Blizzard Bags, it just adds new ones to configure.

So anyone know about an addon that moves the Blizzard Bags, without to much other stuff ?

Mod named Movable Bags. at wowinterface, it shows to be updated.