WoW:API GetCompanionInfo: Difference between revisions

m
→‎Example: : Fixed code to match result
(→‎Returns: Changed the order of the return variables to match the example given.)
m (→‎Example: : Fixed code to match result)
Line 29: Line 29:
  for i=1,GetNumCompanions("CRITTER"),1 do
  for i=1,GetNumCompanions("CRITTER"),1 do
  local creatureID, creatureName, creatureSpellID, icon, issummoned = GetCompanionInfo("CRITTER", i);
  local creatureID, creatureName, creatureSpellID, icon, issummoned = GetCompanionInfo("CRITTER", i);
  ChatFrame1:AddMessage(creatureID .. " " .. creatureSpellID .. " " .. creatureName .. " " .. icon) end
  ChatFrame1:AddMessage(creatureID .. " " .. creatureSpellID .. " " .. creatureName .. " " .. icon .. " " .. issummoned) end
<!-- end code -->
<!-- end code -->


Anonymous user