Livestock

27 - Global error (nil value) in Wintergrasp

What steps will reproduce the problem?
1. Attempt to mount using a SmartMount hotkey keybinding while in Wintergrasp

What is the expected output? What do you see instead?
Flying mount when battle not in progress, ground mount when battle is in progress

What version of the product are you using?
Livestock, v1.3.7

Do you have an error log of what happened?
Yes...

Date: 2011-02-21 14:25:01
ID: 1
Error occured in: Global
Count: 14
Message: ..\AddOns\Livestock\Livestock.lua line 1067:
   attempt to call global 'GetWintergraspWaitTime' (a nil value)
Debug:
   [C]: GetWintergraspWaitTime()
   Livestock\Livestock.lua:1067 LandOrFlying()
   Livestock\Livestock.lua:1135 SmartPreClick()
   [string "*:PreClick"]:1:
      [string "*:PreClick"]:1

Please provide any additional information below.

User When Change
Kharthus Mar 26, 2011 at 19:51 UTC Changed status from Replied to Fixed
Ackis Mar 09, 2011 at 00:11 UTC Changed status from Waiting to Replied
Kharthus Feb 26, 2011 at 18:52 UTC Changed status from New to Waiting
taurolyon Feb 21, 2011 at 19:31 UTC Create

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

  • 5 comments
  • Avatar of Ackis Ackis Mar 19, 2011 at 17:34 UTC - 0 likes

    Yeah that last code update works.

    BFAK:Ackis,90710388,2f62cbb4c100385c86df0c1418f5ac5a2cb1a2bc3f2a18f13291792dbb3a1480

  • Avatar of Kharthus Kharthus Mar 15, 2011 at 05:32 UTC - 0 likes

    Is it working now? I'm not really playing much currently.

  • Avatar of Ackis Ackis Mar 10, 2011 at 01:14 UTC - 0 likes

    Got a chance to test in a battle and there's something wrong. I wasn't able to troubleshoot it however.

    I just updated the code, tested it out a bit more this time.

    Last edited Mar 10, 2011 by Ackis
  • Avatar of Ackis Ackis Mar 09, 2011 at 00:11 UTC - 0 likes

    Both.

    Simple fix:

    http://wowprogramming.com/docs/api/GetWorldPVPAreaInfo

    Replace/add this to line 1067:

    		local _, _, isActive = GetWorldPVPAreaInfo(1)
    		return ((zone == L.LIVESTOCK_ZONE_WINTERGRASP and isActive == true) and "LAND") or "FLYING" -- check to see if a battle is in progress and if so, we're on a land mount.  If not, flying mount.and if so, we're on a land mount.  If not, flying mount.
    

    Add this to line 1183 (after the if statement):

    		local _, _, isActive = GetWorldPVPAreaInfo(1)
    

    Change line 1195 to:

    		elseif (GetZoneText() == L.LIVESTOCK_ZONE_WINTERGRASP and isActive == false) then
    

    Line numbers are based on previous line additions. Should be easy to figure out.

    Last edited Mar 10, 2011 by Ackis
  • Avatar of Kharthus Kharthus Feb 26, 2011 at 18:52 UTC - 0 likes

    During a battle or not?

  • 5 comments

Facts

Last updated
Mar 26, 2011
Reported
Feb 21, 2011
Status
Fixed - Developer made requested changes. QA should verify.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees