Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-21-10, 05:36 AM   #1
Ruinit
A Deviate Faerie Dragon
Join Date: Aug 2009
Posts: 19
Lua Help with error please

With this code I get an error could you please tell me what is wrong with it. Thanks.

function GRM_BriefListOnClick()
--------------------------------------------------------------
if ( GRM_BriefLast_Selected ) then
_G[GRM_BriefLast_Selected]:UnlockHighlight();
end
GRM_BriefLast_Selected = self:GetName();
_G[GRM_BriefLast_Selected]:LockHighlight();

local title = _G[GRM_BriefLast_Selected.."_Text"]:GetText();

GRM_ClearBriefText();
GRM_BriefTitle_Edit:SetText(title);
GRM_BriefBodyScrollText:SetText(GRM_BriefList[title]);
GRM_BriefTitle_Edit:ClearFocus();
GRM_BriefBodyScrollText:ClearFocus();
end



ERROR MESSAGE

1x GoldRaidManager-4.0.1.0\GoldRaidManager.lua:1278: attempt to index global 'self' (a nil value)
<string>:"*:OnClick":1: in function <[string "*:OnClick"]:1>

Locals:
self = GRM_BriefList_Entry3 {
0 = <userdata>
}
button = "LeftButton"
down = false
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Lua Help with error please


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