Hi there, im starting into Lua scripting for make npc gossip, mob, etc. I would like to know what is my error in this script (Teleporter)
When im starting world.exe, i got an error like Expected symbol "=" near On_Gossip or something like that.
There is the script:
____________________________________
function On_Gossip(unit, event, player)
unit:GossipCreateMenu(3544, player, 1)
unit:GossipMenuAddItem(2, "Capital Cities", 1, 1)
unit:GossipSendMenu(player)
end
function Gossip_Submenus(unit, event, player, id, intid, code)
if(intid == 999) then
unit:GossipCreateMenu(3543, player, 1)
unit:GossipMenuAddItem(2, "Main Cities", 1, 1)
unit:GossipSendMenu(player)
end
if(intid == 1) then
unit:GossipCreateMenu(3543, player, 1)
unit:GossipMenuAddItem(1, "Stormwind", 300, 1)
unit: Gossipmenuadditem(1, "Darnassus", 200, 1)
unit:GossipSendMenu(player)
end
if(intid == 300) then
player:Teleport(0, -8870.773438, 586.072815, 92.664047)
unit:GossipComplete(player)
end
elseif
if (intid == 200) then
player:Teleport(0, -3039.23891, 293.93482, 70.3295)
Unit: GossipCompolete(Player)
end
RegisterUnitGossipEvent(43214, 1, "On_Gossip")
RegisterUnitGossipEvent(43214, 1, "Gossip_Submenus")
____________________________________________________
So, i dont know where is my error, and if you can give me a link or something like that, for learn lua scripting (world of warcraft), I would apréciate.
Thanks