Maintenance for the week of December 23:
· [COMPLETE] NA megaservers for maintenance – December 23, 4:00AM EST (9:00 UTC) - 9:00AM EST (14:00 UTC)
· [COMPLETE] EU megaservers for maintenance – December 23, 9:00 UTC (4:00AM EST) - 14:00 UTC (9:00AM EST)

Problems handling Guild leaving/joining

Dar_Zeena
Dar_Zeena
✭✭
I have been working on an addon for a long time now, it's basically finished, the only problem I seem to be having comes in at handling leaving and joining guilds.
I obviously looked at other addons on how they do it etc but it looks like this problem is specific to my addon.

I'm saving guild data stuffs kind of like this:
savedVariables[gID].cats = "all of them"

Now, when I leave a guild apparently it sets the gIDs to something like 11-15 instead of 1-5 like it's supposed to. (this happens even before handling anything with EVENT_GUILD_SELF_LEFT_GUILD or whatever)
GuildIDs are taken like this:
	local numGuilds = GetNumGuilds()

	for i=1,numGuilds do
		local gID = GetGuildId(i)
		...
	end

Now my question is, (I don't see anything wrong here) am I missing something or am I required to use the guild leave events to make it work properly?
Edited by Dar_Zeena on June 29, 2015 11:09PM
Sophisticated Brat
"Can you believe we have to register to enter the city?"

VR16 - Mizuki Andariaa - DK Tank
  • Ayantir
    Ayantir
    ✭✭✭✭
    You need to save your data with guildname instead of guildId, to prevent reorganization problems.
    Obsessive Compulsive Elder Scrolls addons Coder
    A Few millions downloads of ESO addons now.
    Master crafter on my main char since release. All tradeskills, recipes \o/, researchs (since long), 35 styles known
    My little french Guild: Cercle de l'Eveil
  • Dar_Zeena
    Dar_Zeena
    ✭✭
    Ayantir wrote: »
    You need to save your data with guildname instead of guildId, to prevent reorganization problems.

    Aww.. I thought I could avoid that and save a little space..

    That makes me wonder.. why don't we have something like GetGlobalGuildId() that returns the actual guildId?
    Sophisticated Brat
    "Can you believe we have to register to enter the city?"

    VR16 - Mizuki Andariaa - DK Tank
  • Ayantir
    Ayantir
    ✭✭✭✭
    this kind of info is not sent to the lua, maybe the executable, but not lua engine.
    Obsessive Compulsive Elder Scrolls addons Coder
    A Few millions downloads of ESO addons now.
    Master crafter on my main char since release. All tradeskills, recipes \o/, researchs (since long), 35 styles known
    My little french Guild: Cercle de l'Eveil
Sign In or Register to comment.