• 0

    posted a message on Help With Easy Old Addon Script
    Quote from Phanx
    If that's your whole code, you have several major problems:

    1. The frame reference, event name, and event arguments are NOT set as global variables since WoW 4.0 (and it's been recommended not to use them since WoW 2.0). One consequence of this is that there is no global "this". You should be seeing several errors in the vein of "attempt to index global 'this' (a nil value)".

    2. You don't have a frame, so you have nothing to call the :RegisterEvent or :SetScript methods on.


    i'm guessing there's probably an additional xml file that calls HelloWorld from a frame OnLoad script.

    that would explain the global namespace function and the use of "this:" as a reference.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Help With Easy Old Addon Script
    Quote from walker112
    the first error is line 210 'end' expected to close 'function' at line 5 'elseif'


    so that's the syntax error i was talking about. the lua compiler is failing on the code, so the api is not even an issue.

    i would suggest breaking down your handler into multiple functions based on the combat log event instead of having a ginormous if-then-else construct where you're having trouble matching ifs to ends.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Help With Easy Old Addon Script
    if you're getting a nil HelloWorld() error, then it sounds to me like the problem is syntax or maybe in the way the thing is loaded. it's possible that the loading mechanisms have changed since then. what is your first error? that's really the only one that matters.

    i know you're just trying to get a quick question in, but it's probably best to post your entire code.
    Posted in: Lua Code Discussion
  • 0

    posted a message on GnomeWorks -- official thread
    i'm hoping to incorporate groups pretty soon. unfortunately, i haven't had much time to work on it for the last few weeks. i'm hoping this weekend to spend a good chunk of time addressing some outstanding issues.
    Posted in: General AddOns
  • 0

    posted a message on detecting spells cast with CLEU
    d'oh.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Complete and Equip!
    Quote from Tekkub
    You're overcomplicating the problem :P


    it's my job. :)
    Posted in: Addon Ideas
  • 0

    posted a message on calling function name
    yeah, i had figured there'd be some cases of anonymous functions. it's only a bit of info to help me debug and is informational only. if i even decide i need it. my first version just used the environment which was actually good enough to let me print an error and record that i had acknowledged the error so it wouldn't keep printing.

    probably won't need to go further for now, but i might use this for something else.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Complete and Equip!
    i knew you were going to say that. but doesn't engravings require you to have the item handy in some way in order to get the tooltip?

    my vision of this system would be:

    you loot a new pair of pants and they're determined to be a possible improvement thru a very loose metric (better to be overly generous with whether it's an improvement). a frame pops up showing your current pants and this new pair using tooltips (so tooltip mods like pawn and ratingsbuster would add their details). you like them, so you click "equip" to put them on.

    also on this frame is a dropdown menu of your current equipment sets that you can select to see the different pants comparison in each of those sets to see if you want to replace any of those items as well. so you click "healing" and it shows the pants in your "healing" set. you like the current healing pants better, so you check "dps" and then "tanking". you like the new ones better than the old tanking pants, so you say "update" to put those pants into that equipment set.

    i suppose a problem would be that the built-in manager doesn't allow you to manage equipment sets unless you have all the items onhand. so maybe that would be a deal breaker unless you somehow queued up the change (oh my) or just supported itemrack instead.
    Posted in: Addon Ideas
  • 0

    posted a message on Complete and Equip!
    Quote from Tekkub
    That's exactly my point, by saving them in the set I *can* know what is in the set at all times without having to carry the items with me. Then when, say, a holy plate item drops I can very quickly tell if it's something I need to hold on to for the bank when I'm back in town, or if I should just vendor it off in the field.


    sure. i guess it's just a matter of how often you collect new things that might be upgrades and how often you check them against your item sets to see if those items should be upgraded in those sets. some automation here would be useful, i think.

    when i was leveling up thru bgs i would hit the ah every couple levels to see what stuff was worth buying and it was honestly a pain the but to shop for different specs because i could never remember what gear i had in each one because it was changing so fast. this was also complicated by purchasing items in advance of being able to use them and shelving a toon for weeks at a time...
    Posted in: Addon Ideas
  • 0

    posted a message on calling function name
    ah, okay. i thought there was a function to do this, but i couldn't find it. thanks.
    Posted in: Lua Code Discussion
  • 0

    posted a message on calling function name
    i'd like to record what functions are calling a particular function. it's for a message handling system and it would be nice to know if something is sending a message that has nobody listening for it and if so, who it is that's sending it so i can see if it's a bug/typo.

    i was thinking of a different horrible way:

    scrubbing _G[] to generate a lookup table for all known functions (recursively descending into tables for methods) and then indexing them by their environment via getfenv and then using getfenv(1) inside my message handling function to look up into that function name table. if no name, then assume an anonymous function, i guess. altho, maybe it's not really that horrible. horrible sounding stuff is often really easy in lua.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Complete and Equip!
    i meant useless in the sense that if you are levelling and constantly getting new, better equipment, then you have to always know what you've got in your different sets in order to remember to adjust them as you collect better stuff. which kind of defeats the purpose either of equipment sets or of the mod that makes equipping new/better items easy for the user. unless it also adjusts those sets for you.

    edit: i guess a set would still have use even if you had to micro manage it simply because it's a quick change, but for me, i find equipment sets are nice because they're a way to "remember my settings" and not have to constantly be looking at what items i want equipped for whatever purpose i need.
    Posted in: Addon Ideas
  • 0

    posted a message on calling function name
    is there a way to get the calling function name from a lua function?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Complete and Equip!
    lol. you could certainly start simple with just an itemlevel check and go from there. :)

    i think the equipment set stuff would be nice either way because it's nearly useless to use equipment sets while leveling because equipment changes so often.
    Posted in: Addon Ideas
  • 0

    posted a message on Complete and Equip!
    maybe this could be done as in a BAG_UPDATE event. when you get an item that equipable and has a higher itemlevel than the item it would replace, it could ask if you want to equip it. perhaps showing the tooltip and the compare tooltip.

    options could include automatically utilizing pawn scoring systems and maybe turning off the check for non soulbound items (so it would suggest you equip items that you might intend to sell, trade, stash away for an alt, etc).

    maybe it could plug into the quest reward window by highlighting what it thinks is an upgrade.

    could also maybe check your equipment sets and replace the item there, too. (including item set mods like item rack).

    $.02
    Posted in: Addon Ideas
  • To post a comment, please or register a new account.