View Single Post
10-31-16, 03:20 AM   #11
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Tesser View Post
But the problem is not from the WoW command / macro line - the problem is from within Gryphonheart Items addon, which allows you to script your own lua.
If you can call the function from the command line yourself, then the problem is not with the function. A cursory glance at the Gryphonheart Items addon (I searched for text from the error message you got to find the relevant section of code) shows that it is setting up a custom function environment for user macros/snippets to run in, but that environment does not include the complete WoW API. The "GetPVPDesired" is not in the list of included functions; others may be missing as well.

The only way to fix this is to get the addon's author to add the missing function. They should probably also be using a script to check for added/removed functions in-game after each patch, rather than trying to keep up with such changes by hand (a tactic prone to error) or relying on a third-party source like Wowpedia (which may not always be up to date or accurate).

Originally Posted by Tesser View Post
From the printout on "/dump" it looks like maybe it returns an array, so I also tried "print(test[1])" to no avail.
No, /dump just numbers the values so you can easily identify each value in without having to count them by hand. Also, numbering the values means it doesn't need to print nils in the middle of a list -- if a function returns 5 values, and the 2nd and 4th values are nil, /dump will only show you values 1st, 3rd, and 5th values.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote