Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Serverside Modding => Topic started by: Nortwin on February 03, 2013, 10:19:45 pm
-
Hey Modcraft!
I am doing a remake of the LUA files (GlueXML), to customize a login screen.
However, when I log in, I get this:
(http://i.minus.com/jC3gyJPkdI58J.jpg)
What have I screwed in GlueButtons.lua?
Here is my code:
http://pastebin.com/KuPWdN5T (http://pastebin.com/KuPWdN5T" onclick="window.open(this.href);return false;)
Thank you all!
Nortwin
-
deleted bump
-
Line 11 index in table is nil.
if ( _G[self:GetName().."Rays"]:IsShown() ) then
_G (the global Lua storage location) does not index the name of the object & Rays. No idea what would cause that, but a temporary hack fix:
SECONDS_PER_PULSE = 0.75;
function GlueButtonMaster_OnUpdate(self, elapsed)
if VX_MUSICTIMER then
if VX_MUSICTIMER < GetTime() then
VX_ONMUSIC = true;
PlayLoginMusic();
end
end
if (_G[self:GetName().."Rays"]) then
if ( _G[self:GetName().."Rays"]:IsShown() ) then
local SECONDS_PER_PULSE = 0.75;
local sign = self.pulseSign;
local counter;
if ( self.startPulse ) then
counter = 0;
self.startPulse = true;
sign = 1;
else
counter = self.pulseCounter + (sign * elapsed);
if ( counter > SECONDS_PER_PULSE ) then
counter = SECONDS_PER_PULSE;
sign = -sign;
elseif ( counter < 0) then
counter = 0;
sign = -sign;
end
end
local alpha = counter / SECONDS_PER_PULSE;
_G[self:GetName().."Rays"]:SetVertexColor(1.0, 1.0, 1.0, alpha);
self.pulseSign = sign;
self.pulseCounter = counter;
end
end
end
-
That's not a fix. The fix would be having the object in the interface.
-
That's not a fix. The fix would be having the object in the interface.
"Hack-fix",
It will fix the error message being displayed which is the primary issue at the moment. Implementing it properly by having the non-required object displayed is not necessary but preferable.
-
It will fix the error message being displayed which is the primary issue at the moment.
Suppressing an error message instead of solving the error never fixes anything and is the most useless thing to do in development. Fix the issue, or don't do anything.
-
Thank you for the response, using that for now. :)
-
You may as well use
SECONDS_PER_PULSE = 0.75;
function GlueButtonMaster_OnUpdate(self, elapsed)
if VX_MUSICTIMER then
if VX_MUSICTIMER < GetTime() then
VX_ONMUSIC = true;
PlayLoginMusic();
end
end
end
which does the same: Playing music.
-
Thank you, I already included the function in another Lua :)