Thread Tools Display Modes
Prev Previous Post   Next Post Next
04-29-11, 07:58 PM   #1
Maliack
A Defias Bandit
Join Date: Apr 2011
Posts: 2
sTotal noob question

Hi all,

I'm having some difficulties getting into writing an addon. It seems that the APIs aren't really documented in any one place - I've tried wowprogramming, wowhead, wowwiki, and just not sure if there's a 'definitive' description available.

I'm trying to get past the "Hello, world" coding, and just get something as simple as the current player's mana, etc.

I try something like:

Code:
  local powerType, powerToken = UnitPowerType("player");
  print("powerToken is = ".. powerToken);
  print("powerType is = ".. powerType);
So, on my Shaman (resto), I get that powerToken = "" and powerType = 0 (so, mana).

If I try calling and then printing the value of UnitPower("player"), I always end up with 0 being output.

I'm not sure if I'm missing something very obvious, or what. If anyone has some suggestions, or even a helpful smack upside the head, I'd appreciate it!
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » sTotal noob question


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off