Hi,
I am trying to make an addon about companions / pets but I always get an error when I use the function:
Lua Code:
CallCompanion("CRITTER",index);
where
index <= GetNumCompanions("CRITTER")
The error is something like in English "You don't have any pets" (in italian is "Non hai un famiglio").
But a simple for loop print the name of all my pets:
Lua Code:
for index=1,GetNumCompanions("CRITTER") do
local _,name=GetCompanionInfo("CRITTER",index);
print(name:lower())
end
Also the other summon function
gives to me the same error.
Probably the new pet combat system broken the api.
Am I looking in a wrong place for outdated documentation ? (
http://wowprogramming.com and
http://www.wowwiki.com/API_CallCompanion)
Should I use an external library like LibPetJournal ?
Or simply I missing something ? :-)
Thanks in advance for any help.