+ Reply to Thread
Results 1 to 15 of 15

Thread: [Help Wanted] Why won't it show?

  1. #1
    Soulwalker
    Join Date
    May 2011
    Posts
    10

    Default [Help Wanted] Why won't it show?

    I'm not new to programing, but I've really not done much with lua or addon development. At the moment I'm just trying to get a helloworld program working. I'm not sure exactly what I'm missing, but I can't even get my addon to show up in the addons list.

    my toc file is like so
    Code:
    Identifier = "Test"
    Name = "Test"
    Description = "A test addon."
    Author = "Mogul@Laethys"
    Email = "me@someplace.com"
    Environment = "1.6"
    
    RunOnStartup = {
    	"test.lua"
    }
    and my lua file reads
    Code:
    local context = UI.CreateContext("TestContext")
    local text = UI.CreateFrame("Text","Text",context)
    text:SetText("Test")
    text:SetWidth:text:GetFullWidth()
    text:SetHeight:text:GetFullHeight()
    text:SetPoint("TOPCENTER",UIParent,"TOPCENTER")
    Any help on this would be greatly appreciated...

  2. #2
    Sword of Telara Semele's Avatar
    Join Date
    Mar 2011
    Posts
    872

    Default

    A quick guess is you forgot

    Version = "blah"
    Rank 76 Guardian Mage

  3. #3
    Telaran
    Join Date
    Oct 2011
    Posts
    86

    Default

    Quote Originally Posted by Guliver View Post
    I'm not new to programing, but I've really not done much with lua or addon development. At the moment I'm just trying to get a helloworld program working. I'm not sure exactly what I'm missing, but I can't even get my addon to show up in the addons list.

    my toc file is like so
    Code:
    Identifier = "Test"
    Name = "Test"
    Description = "A test addon."
    Author = "Mogul@Laethys"
    Email = "me@someplace.com"
    Environment = "1.6"
    
    RunOnStartup = {
    	"test.lua"
    }
    and my lua file reads
    Code:
    local context = UI.CreateContext("TestContext")
    local text = UI.CreateFrame("Text","Text",context)
    text:SetText("Test")
    text:SetWidth:text:GetFullWidth()
    text:SetHeight:text:GetFullHeight()
    text:SetPoint("TOPCENTER",UIParent,"TOPCENTER")
    Any help on this would be greatly appreciated...
    Make sure the folder is called Test and is in the \interface\addons folder
    You dont have a Version = "something" in the toc.
    Also, not sure if it matters but you may have to have NameShort = "Test" in the toc as well.

  4. #4
    Soulwalker
    Join Date
    May 2011
    Posts
    10

    Default

    Since it seems so pedantic, I got to ask, could it be that I am using Notepad? I'm only asking cause I've done that stuff, and it still is not showing...(Other addons work fine)
    Last edited by Guliver; 01-11-2012 at 11:37 AM.

  5. #5
    Champion Lorandii's Avatar
    Join Date
    Jun 2011
    Posts
    516

    Default

    Quote Originally Posted by Guliver View Post
    Since it seems so pedantic, I got to ask, could it be that I am using Notepad? I'm only asking cause I've done that stuff, and it still is not showing...(Other addons work fine)
    Any text editor will work, including Notepad.

  6. #6
    RIFT Community Ambassador the_real_seebs's Avatar
    Join Date
    Jan 2011
    Posts
    16,859

    Default

    Choice of editor doesn't matter.

    Here's what I usually do:

    Library = Library or {}
    Library.MyName = Library.MyName or {}

    and then when I'm up and running, I "/print Library.MyName". (I have a /print addon, but I think there's built in tools, I think "/script dump(Library.MyName)" will work.)

    If I don't see anything, or I get a nil, that means my library didn't get loaded at all, and if I don't see any syntax errors, that means the Toc didn't pass muster.

    You may need any or all of:
    Version
    NameShort

    In mine, I have
    Description = {
    English = "string"
    }

    which may matter.
    You can play WoW in any MMO. You don't have to play WoW in RIFT. Oh, and no, RIFT is not a WoW clone. Not having fun any more? Learn to play, noob! I don't speak for Riftui, but I moderate stuff there. Just came back? Welcome back! Here's what's changed. (Updated for 2.5!)

  7. #7
    Soulwalker
    Join Date
    May 2011
    Posts
    10

    Default

    Ok, well in the same folder I have my other working UI's I have made a folder called ach
    In this folder I have two files...
    ach.toc
    Code:
    Identifier = "ach"
    Name = "ach"
    NameShort = "ach"
    Description = "A test addon."
    Author = "Mogul@Laethys"
    Email = "me@someplace.com"
    Version = "0.1"
    Environment = "1.6"
    
    RunOnStartup = {
    	"ach.lua"
    }
    and ach.lua
    Code:
    local context = UI.CreateContext("AchieverContext")
    local text = UI.CreateFrame("Text","Text",context)
    text:SetText("Test")
    text:SetWidth:text:GetFullWidth()
    text:SetHeight:text:GetFullHeight()
    text:SetPoint("TOPCENTER",UIParent,"TOPCENTER")
    it still isn't showing up....( To clarify, I can't enable or disable it)
    Last edited by Guliver; 01-11-2012 at 11:52 AM.

  8. #8
    RIFT Community Ambassador the_real_seebs's Avatar
    Join Date
    Jan 2011
    Posts
    16,859

    Default

    Well, it should be producing runtime errors rather than not even showing up, but I do note that you named the addon "Test", but use the name "Text" in your CreateFrame, and that won't work.
    You can play WoW in any MMO. You don't have to play WoW in RIFT. Oh, and no, RIFT is not a WoW clone. Not having fun any more? Learn to play, noob! I don't speak for Riftui, but I moderate stuff there. Just came back? Welcome back! Here's what's changed. (Updated for 2.5!)

  9. #9
    Soulwalker
    Join Date
    May 2011
    Posts
    10

    Default

    Is there anywhere I can find out what the parameters are for these commands - I'm only going by whats in the stickies and the documentation is a little sparse

  10. #10
    Champion Lorandii's Avatar
    Join Date
    Jun 2011
    Posts
    516

    Default

    1. Is your toc file named RiftAddon.toc specifially? Unlike WoW, where it is named MyAddon.toc, Rift must use RiftAddon.toc.
    2. As mentioned, you are missing the Version string.
    3. NameShort is optional, and usually only used if the name of the addon is overly long. The short name is used in Print statements. Spits out "MyAddon: Hello world!" rather than "MyHelloWorldAddon: Hello world!"
    Code:
    Library = Library or {}
    Library.MyName = Library.MyName or {}
    This is great if you want a global reference in your lua file that needs to be read in a different lua file. However, if your addon is self contained, use this instead
    Code:
    local MyAddon, privateTable = ...
    You can name both variables however you so choose.

  11. #11
    Champion Lorandii's Avatar
    Join Date
    Jun 2011
    Posts
    516

    Default

    Quote Originally Posted by Guliver View Post
    Is there anywhere I can find out what the parameters are for these commands - I'm only going by whats in the stickies and the documentation is a little sparse
    http://wiki.riftui.com/Main_Page

  12. #12
    Soulwalker
    Join Date
    May 2011
    Posts
    10

    Default

    I have even gone to the trouble of matching the case, and thx for the link, it is now on my web browser fav bar (yes I still use IE 9)
    Last edited by Guliver; 01-11-2012 at 12:02 PM.

  13. #13
    RIFT Community Ambassador the_real_seebs's Avatar
    Join Date
    Jan 2011
    Posts
    16,859

    Default

    The reason for the global name exposure is specifically to create a thing I can look at from the command line.
    You can play WoW in any MMO. You don't have to play WoW in RIFT. Oh, and no, RIFT is not a WoW clone. Not having fun any more? Learn to play, noob! I don't speak for Riftui, but I moderate stuff there. Just came back? Welcome back! Here's what's changed. (Updated for 2.5!)

  14. #14
    Telaran
    Join Date
    Oct 2011
    Posts
    86

    Default

    Quote Originally Posted by Guliver View Post
    Ok, well in the same folder I have my other working UI's I have made a folder called ach
    In this folder I have two files...
    ach.toc
    Not sure what you are saying here. Your first post you made an addon called test, now its ach

    The first addon should be \Interface\Addons\Test\and then your toc and files
    The ach addon should be \Interface\Addons\Ach\....
    if you have the ach folder inside the test folder, I doubt it will show up unless you add embed in your toc file.

    Also, the 2 files you should have inside that folder should be RiftAddon.toc and ach.lua. Not ach.toc
    Last edited by TinnerKB; 01-11-2012 at 07:56 PM.

  15. #15
    Soulwalker
    Join Date
    May 2011
    Posts
    10

    Default

    Quote Originally Posted by TinnerKB View Post
    ... should be RiftAddon.toc and ach.lua. Not ach.toc
    Ok, I guess that must be it, I'll try again when server comes back up.....

    Thx everybody for jumping in and helping, this community is pretty kewl...

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts