Issue #135 resolved
Bubba Johnson
created an issue

I have been coding with this (love it btw) and just recently realized that you support WoW API (HAPPY DAYS ^_^). However when I got it all installed and added, it would come up with the auto completion for all the WoW API's, but when I run the code, it returns as nil (sad panda). I went into the Library of functions and set some returns that would be suitable for the code I was testing just so it would return something, but the functions still returned nil...

I have searched the Issues for any mention by others, and uncovered nothing. So I'm curious if I'm just misunderstanding the point of the API, or if maybe I installed it incorrectly (I followed the Custom Library Installation pictures found on WoW API download page).

I'm running IntelliJ IDEA 13 EAP. I will try IntelliJ IDEA 12.1 as I wait for a response. If I do not update, then my tests were unsuccessful.

I have attached my script I was testing, It fails as line 32 IsInRaid(), and if I skip that it fails at GetNumGroupMembers().

So I'm assuming it's all the functions that will return nil.

Comments (8)

  1. Advert Slaxxor

    Unfortunately, re-creating all of WoW's API is a massive task.

    There was a project trying to do it some time ago, called WowBench -- but I think it's dead.

    As you suspected, the WoW API provided is just for auto completion -- you'll run into the problems you described if you try to run it.

  2. Advert Slaxxor

    You could get your script to execute if you add returns to everything, that return some usable data for your script -- but as I mentioned earlier, it's a massive task.

    It'll be far easier (and more functional) for you to write a bat/shell script to copy files from your project directory into your addon folder, then running WoW.

  3. Bubba Johnson reporter

    ty for your help :) i'll probably just hard link it inside the folder :)

    shame this can't run it.... maybe i'll code in my most used functions just for testing purposes

  4. Jon S Akhtar repo owner

    You cannot run the WoW API lua scripts using the IDE. You run them inside WoW.

    I have some nice debug tools that come with the addon Prat 3.0. You can download it, locate the pullouts folder and pull the folder Prat_Debug out next to the Prat folder.

    This will give you things like tab completions in /script macros, a much prettier print() . Don't forget that prat's copychat module will let you copy the output of the print() statement. Try ctrl and option clicking the copy button for different behaviours.

    Typically we change the source, then inside wow type /rl, or shift click the bugsack icon (you are using bugsack right).

  5. Log in to comment