Thread: Update 2.5
View Single Post
07/25/16, 02:06 PM   #34
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Originally Posted by Weolo View Post
I just found something a bit odd
When you create a brand new character and log in for the first time, the character does not show up in the GetCharacterInfo() function
It doesn't seem to appear in the functions data until you log out to the character selection screen and back in.

Lua Code:
  1. d("GetCurrentCharacterId: "..GetCurrentCharacterId())
  2. d("GetNumCharacters: "..GetNumCharacters())
  3. for i = 1, GetNumCharacters() do
  4.     local name, gender, level, championRank, classId, raceId, alliance, id, locationId = GetCharacterInfo(i)
  5.     d("id="..tostring(id))
  6. end
  7. local name, gender, level, championRank, classId, raceId, alliance, id, locationId = GetCharacterInfo(GetCurrentCharacterId())
  8. d("id2="..tostring(id))
In the above code example GetCurrentCharacterId() does not appear in the for loop.
And id2 prints out nothing, not even nil
Yup, that's a bug. We'll get a fix in for it.
  Reply With Quote