Forums » Bugs

API problem

Jan 04, 2010 Angel of Death link
GetGuildTag(id) is giving incorrect values. Using the id of some members of CHRN, it returns nothing. It currently seems like it only returns a name when id is nil, and then it returns your own tag, if any. This isn't the intended functionality, at least according to the wiki. Has something broken?
Jan 04, 2010 mr_spuck link
That looks like one of those calls that only work on characters that have been in the same sector.

The PLAYER_GUILD_TAG_UPDATED event should be triggered with a charid when you get a guild tag.
Jan 07, 2010 raybondo link
Either the other player needs to be in your sector or you need to be in the same guild and they need to be logged in.

GetGuildTag(nil) is the same as calling it with your own character id.

The PLAYER_GUILD_TAG_UPDATED event only gets called if the guild tag changes, not gets initialized.
Jan 07, 2010 Angel of Death link
Either the other player needs to be in your sector or you need to be in the same guild and they need to be logged in.

That is not what we experienced. With guild members who were logged in at the time, GetGuildTag(theirid) gave "". In fact, they themselves then did GetGuildTag(myid) and got "". From our investigations, it would appear that even if you're in the same guild you need to have seen the other player in your sector. I don't know if that's how it was intended, but that seems to be how it works now.
Jan 08, 2010 raybondo link
I tried it on our test server and it worked as expected. Try it there and see if it works for you. Also, perhaps post what character you're doing this from and what character you're trying to query and what sectors each character is in.