View Single Post
04-12-07, 03:44 PM   #5
Johan1923
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Apr 2005
Posts: 10
TutorialProjectForm.xml
Code:
<Scripts>
      <OnLoad>
             this:RegisterEvent("VARIABLES_LOADED");
	     this:RegisterForDrag("LeftButton");
	     SLASH_TUTORIAL_PROJECT1 = "/tutorial";
             SLASH_TUTORIAL_PROJECT2 = "/tut"; -- A shortcut or alias
             SlashCmdList["TUTORIAL_PROJECT"] = Tutorial_Project_Command;
	</OnLoad>
its the only coding ive actively got put into the files.

in regards to:
function addonname_OnLoad()
SlashCmdList["ADDONNAME"] = FunctionToCall;
SLASH_ADDONNAME1 = "/slash1";
SLASH_ADDONNAME2 = "/slash2";
end

i understand the statements and the setup, it goes into the .lua file, the only thing i dont understand is the "= FunctionToCall;" i havent found anything to state how that is supposed to be setup or if its to be left alone. is that supposed to be the function to load the addon or toggle frame visibility?

ive also added the following in an attempt to display a message when the mod initializes with the UI.

TutorialProject.lua
function TutFormEvent(arg1)
........
DEFAULT_CHAT_FRAME:AddMessage("Tutorial Project Addon has been loaded. Type /turoial or /tut for the menu.");

the bigges thing is im not sure how to implement and where to implement the slash command list in the coding cuase it doesnt appear to be a way in the program so i went into the coding, but wowwiki doesnt seem to be real thorough on it. thanks, im sure ill have many more questions to follow hehe. very new to all this but im really wantin to figure this kinda thing out and learn it.
  Reply With Quote