MobSpells

15 - r103 initialization error

What steps will reproduce the problem?
1. Do a cold login (not a reloadui)

What is the expected output? What do you see instead?
a torrent of nil errors.

What version of the product are you using?
r103 alpha (was present in previous versions as well)

Do you have an error log of what happened?

MobSpells\\MobSpells-r103.lua:540: table index is nil

Please provide any additional information below.
The error is caused because GetRealZoneText() does not return values until the first ZONE_CHANGED_NEW_AREA event fires on a cold login.
Since this event is already registered to check for enabling logging or not the simplest fix is to add these to

local function shouldLog()
	local db = MobSpells.db.profile
	local should = nil
	local i, t = IsInInstance()
	local d = GetInstanceDifficulty()
	local z = GetRealZoneText() -- won't return values until the first ZONE_CHANGED_NEW_AREA on a cold login
	if not z or z == "" then return end

That way CLEU won't be registered (and the error triggered) until the client has initialized far enough to have zone info.

User When Change
Dridzt Jun 28, 2011 at 11:41 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

Facts

Last updated
Nov 05, 2012
Reported
Jun 28, 2011
Status
New - Issue has not had initial review yet.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
1

Reported by

Possible assignees