View Single Post
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