[edit]I figured out the issue, it was something as simple as forgetting to include the new .xml file in the manifest .txt file, but I'll leave everything here for the future people of the internet[/edit]
I am hoping someone out there with more experience than I, can point out the error I'm experiencing. I suspect it's because this guide was written for the API v. 100010, while we're currently on v. 100011 as far as I know.
The guide in question can be found
here, and this question pertains to the section about making a message appear on screen as a graphical element rather than in the console (search for 'Manipulating controls in Lua').
The error I get is the following from the ingame UIerror report:
.../TestAddon.lua:18: Attempt to index a nil value
stack traceback:
.../TestAddon.lua:18: in function 'TestAddon.OnPlayerCombatState'
My code in this section of the file is the following (
TestAddonIndicator:SetHidden(not inCombat) is the function at
line 18):
function TestAddon.OnPlayerCombatState(event, inCombat)
if inCombat ~= TestAddon.inCombat then
TestAddon.inCombat = inCombat
TestAddonIndicator:SetHidden(not inCombat) --line 18
end
end
Where:
TestAddonIndicator:SetHidden(not inCombat)
Is meant to reference the following control element in
TestAddon.xml:
<GuiXml>
<Controls>
<TopLevelControl name="TestAddonIndicator">
<Dimensions x="200" y="25" />
<Anchor point="BOTTOM" relativeTo="GuiRoot" relativePoint="CENTER" offsetY="-20" />
<Controls>
<Label name="$(parent)Label" width="200" height="25" font="ZoFontWinH1" inheritAlpha="true" color="FF0000"
wrapMode="TRUNCATE" verticalAlignment="TOP" horizontalAlignment="CENTER" text="Fighting! Yet Again..">
<Anchor point="TOP" relativeTo="$(parent)" relativePoint="TOP" />
</Label>
</Controls>
</TopLevelControl>
</Controls>
</GuiXml>
I hope someone out there can find the time to answer this question, thanks.
Edited by KanedaSyndrome on 27 June 2015 18:15 KanedaSyndrome's Suggestions For Game ImprovementsThe Fortuitous Collapse of the Wave EquationThe Best Plans Require No Action