Hey again, sorry for all of these posts but im pretty new to this stuff especially when it comes to player phasing in flight paths xD. So basically what I want, is when someone hits the "Fly me to the abandoned camp" button in my npc gossip menu I want him to go to phase 2, atm I have this:
Code:
local GetDisplay = 25579
local NPCID = 450006
function Brann_OnGossipTalk(pUnit, event, player, pMisc)
pUnit:GossipCreateMenu(50, player, 0)
pUnit:GossipMenuAddItem(2, "Get me to the abandoned camp!", 1, 0)
pUnit:GossipMenuAddItem(7, "Leave.", 2, 0)
pUnit:GossipSendMenu(player)
end
function Brann_OnGossipSelect(pUnit, event, player, id, intid, code, pMisc)
if (intid == 1) then
plr:SetPhase(2)
local GoToCamp = LuaTaxi:CreateTaxi()
GoToCamp:AddPathNode(603, -856.2, -130.4, 471.6)
GoToCamp:AddPathNode(603, -562.3, -9.171, 516.9)
GoToCamp:AddPathNode(603, -197.6, 34.06, 455.1)
GoToCamp:AddPathNode(603, -101.2, 132.1, 450.9)
GoToCamp:AddPathNode(603, -91.64, 160.0, 432.7)
player:StartTaxi(GoToCamp, GetDisplay)
end
player:GossipComplete()
end
RegisterUnitGossipEvent(NPCID, 1, "Brann_OnGossipTalk")
RegisterUnitGossipEvent(NPCID, 2, "Brann_OnGossipSelect")
When I hit the "Get me to the abandoned camp" button it will show in world.exe that,
Code:
Attempt to index upvalue 'plr' (a nil value)
So im clueless atm about how to fix this since it has a number in "plr:SetPhase(2)" so how is it a nil value?
Thanks in advance (again).