Getting errors trying to load my lua npc menu

User Tag List

Results 1 to 7 of 7
  1. #1
    Darcvigilante's Avatar Member
    Reputation
    2
    Join Date
    Jul 2008
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting errors trying to load my lua npc

    Here is my script
    Code:
    function On_Gossip(pUnit, event, player)
    pUnit:GossipCreateMenu(3544, player, 0)
    end
    
    pUnit:GossipMenuAddItem(2, "Alliance Teleports",1,0)
    pUnit:GossipMenuAddItem(2, "Horde Locations",2,0)
    pUnit:GossipMenuAddItem(2, "Neutral Cities",3,0)
    pUnit:GossipMenuAddItem(2, "Mall",4,0)
    pUnit:GossipMenuAddItem(2, "Level Area",5,0)
    pUnit:GossipMenuAddItem(2, "PVP Zone",6,0)
    
    function Gossip_Submenus(pUnit, event, player, id, intid, code)
    end
    
    if (intid==999) then 
    pUnit:GossipCreateMenu(3543, player, 0)
    
    pUnit:GossipMenuAddItem(2, "Exodar",1.1)
    pUnit:GossipMenuAddItem(2, "Stormwind",1.2)
    pUnit:GossipMenuAddItem(2, "Ironforge",1.3)
    pUnit:GossipMenuAddItem(2, "Darnassus",1.4)
    pUnit:GossipMenuAddItem(2, "Orgrimmar",2.1)
    pUnit:GossipMenuAddItem(2, "Thunder Bluff",2.2)
    pUnit:GossipMenuAddItem(2, "The Undercity",2.3)
    pUnit:GossipMenuAddItem(2, "Silvermoon City",2.4)
    pUnit:GossipMenuAddItem(2, "Shattrath City",3.1)
    pUnit:GossipMenuAddItem(2, "Dalaran City",3.2)
    pUnit:GossipMenuAddItem(2, "Mall",4.0)
    pUnit:GossipMenuAddItem(2, "Level Area",5.0)
    pUnit:GossipMenuAddItem(2, "PVP Zone",6.0)
    end
    
    if(intid ==1.1) then
    player:Teleport(530,-4014.080078,-11895.799805,-1.990330)
    pUnit:GossipComplete(player)
    end
    if(intid ==1.2) then
    player:Teleport(0,-8912.527344,555.110779,93.746529)
    pUnit:GossipComplete(player)
    end
    if(intid ==1.3) then
    player:Teleport(0,-4980.808594,-881.935547,502.162872)
    pUnit:GossipComplete(player)
    end
    if(intid ==1.4) then
    player:Teleport(1,9941.639648,2615.429932,1318.160034)
    pUnit:GossipComplete(player)
    end
    if(intid ==2.1) then
    player:Teleport(1,1502.709961,-4415.419922,21.779274)
    pUnit:GossipComplete(player)
    end
    if(intid ==2.2) then
    player:Teleport(1,-1285.420044,176.522995,129.994095)
    pUnit:GossipComplete(player)
    end
    if(intid ==2.3) then
    player:Teleport(0,1831.260010,238.529999,60.520802)
    pUnit:GossipComplete(player)
    end
    if(intid ==2.4) then
    player:Teleport(530,9414.179688,-7278.970215,14.203432)
    pUnit:GossipComplete(player)
    end
    if(intid ==3.1) then
    player:Teleport(530,-1722.579956,5382.700195,1.475965)
    pUnit:GossipComplete(player)
    end
    if(intid ==3.2) then
    player:Teleport(0,271.134705,452.466431,56.960014)
    pUnit:GossipComplete(player)
    end
    if(intid ==4.0) then
    player:Teleport(0,-8758.700195,-1597.880005,261.823975)
    pUnit:GossipComplete(player)
    end
    if(intid ==5.0) then
    player:Teleport(0,-8758.700195,-1597.880005,261.823975)
    pUnit:GossipComplete(player)
    end
    if(intid ==6.0) then
    player:Teleport(0,-8758.700195,-1597.880005,261.823975)
    pUnit:GossipComplete(player)
    end
    
    
    
    
    
    RegisterpUnitGossipEvent(90000,1,On_Gossip)
    RegisterpUnitGossipEvent(90000,2,Gossip_Submenus)
    Here is the error


    Sorry for the bigass pic any help would be appreciated
    Last edited by Ground Zero; 06-21-2010 at 03:57 AM. Reason: Code tags

    Getting errors trying to load my lua npc
  2. #2
    Darcvigilante's Avatar Member
    Reputation
    2
    Join Date
    Jul 2008
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anyone? anyone at all?

    ---------- Post added at 12:59 AM ---------- Previous post was at 12:12 AM ----------

    Come on now

  3. #3
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Give us a chance to answer....

    function On_Gossip(pUnit, event, player)
    pUnit:GossipCreateMenu(3544, player, 0)
    end

    pUnit:GossipMenuAddItem(2, "Alliance Teleports",1,0)
    pUnit:GossipMenuAddItem(2, "Horde Locations",2,0)
    pUnit:GossipMenuAddItem(2, "Neutral Cities",3,0)
    pUnit:GossipMenuAddItem(2, "Mall",4,0)
    pUnit:GossipMenuAddItem(2, "Level Area",5,0)
    pUnit:GossipMenuAddItem(2, "PVP Zone",6,0)

    function Gossip_Submenus(pUnit, event, player, id, intid, code)
    end

    Here, your ending the functions before you finish them, so then it goes WTF is that?!? When you try to use pUnit in the middle of no where basically.

    This should work (I haven't checked whole script only where it error'd):

    Code:
    function On_Gossip(pUnit, event, player)
    pUnit:GossipCreateMenu(3544, player, 0)
    pUnit:GossipMenuAddItem(2, "Alliance Teleports",1,0)
    pUnit:GossipMenuAddItem(2, "Horde Locations",2,0)
    pUnit:GossipMenuAddItem(2, "Neutral Cities",3,0)
    pUnit:GossipMenuAddItem(2, "Mall",4,0)
    pUnit:GossipMenuAddItem(2, "Level Area",5,0)
    pUnit:GossipMenuAddItem(2, "PVP Zone",6,0)
    end
    
    function Gossip_Submenus(pUnit, event, player, id, intid, code)
    
    if (intid==999) then 
    pUnit:GossipCreateMenu(3543, player, 0)
    
    pUnit:GossipMenuAddItem(2, "Exodar",1.1)
    pUnit:GossipMenuAddItem(2, "Stormwind",1.2)
    pUnit:GossipMenuAddItem(2, "Ironforge",1.3)
    pUnit:GossipMenuAddItem(2, "Darnassus",1.4)
    pUnit:GossipMenuAddItem(2, "Orgrimmar",2.1)
    pUnit:GossipMenuAddItem(2, "Thunder Bluff",2.2)
    pUnit:GossipMenuAddItem(2, "The Undercity",2.3)
    pUnit:GossipMenuAddItem(2, "Silvermoon City",2.4)
    pUnit:GossipMenuAddItem(2, "Shattrath City",3.1)
    pUnit:GossipMenuAddItem(2, "Dalaran City",3.2)
    pUnit:GossipMenuAddItem(2, "Mall",4.0)
    pUnit:GossipMenuAddItem(2, "Level Area",5.0)
    pUnit:GossipMenuAddItem(2, "PVP Zone",6.0)
    end
    
    if(intid ==1.1) then
    player:Teleport(530,-4014.080078,-11895.799805,-1.990330)
    pUnit:GossipComplete(player)
    end
    if(intid ==1.2) then
    player:Teleport(0,-8912.527344,555.110779,93.746529)
    pUnit:GossipComplete(player)
    end
    if(intid ==1.3) then
    player:Teleport(0,-4980.808594,-881.935547,502.162872)
    pUnit:GossipComplete(player)
    end
    if(intid ==1.4) then
    player:Teleport(1,9941.639648,2615.429932,1318.160034)
    pUnit:GossipComplete(player)
    end
    if(intid ==2.1) then
    player:Teleport(1,1502.709961,-4415.419922,21.779274)
    pUnit:GossipComplete(player)
    end
    if(intid ==2.2) then
    player:Teleport(1,-1285.420044,176.522995,129.994095)
    pUnit:GossipComplete(player)
    end
    if(intid ==2.3) then
    player:Teleport(0,1831.260010,238.529999,60.520802)
    pUnit:GossipComplete(player)
    end
    if(intid ==2.4) then
    player:Teleport(530,9414.179688,-7278.970215,14.203432)
    pUnit:GossipComplete(player)
    end
    if(intid ==3.1) then
    player:Teleport(530,-1722.579956,5382.700195,1.475965)
    pUnit:GossipComplete(player)
    end
    if(intid ==3.2) then
    player:Teleport(0,271.134705,452.466431,56.960014)
    pUnit:GossipComplete(player)
    end
    if(intid ==4.0) then
    player:Teleport(0,-8758.700195,-1597.880005,261.823975)
    pUnit:GossipComplete(player)
    end
    if(intid ==5.0) then
    player:Teleport(0,-8758.700195,-1597.880005,261.823975)
    pUnit:GossipComplete(player)
    end
    if(intid ==6.0) then
    player:Teleport(0,-8758.700195,-1597.880005,261.823975)
    pUnit:GossipComplete(player)
    end
    end
    
    
    
    
    
    RegisterpUnitGossipEvent(90000,1,On_Gossip)
    RegisterpUnitGossipEvent(90000,2,Gossip_Submenus)

  4. #4
    Darcvigilante's Avatar Member
    Reputation
    2
    Join Date
    Jul 2008
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tried that it still has the same error. Sorry a little impatient lol... Thanks for trying to help much appreciated.

  5. #5
    Pedregon's Avatar Contributor
    Reputation
    221
    Join Date
    Aug 2007
    Posts
    705
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this one.

    I just changed pUnit to Unit, lol.

    Code:
    function On_Gossip(Unit, event, player)
    Unit:GossipCreateMenu(3544, player, 0)
    Unit:GossipMenuAddItem(2, "Alliance Teleports",1,0)
    Unit:GossipMenuAddItem(2, "Horde Locations",2,0)
    Unit:GossipMenuAddItem(2, "Neutral Cities",3,0)
    Unit:GossipMenuAddItem(2, "Mall",4,0)
    Unit:GossipMenuAddItem(2, "Level Area",5,0)
    Unit:GossipMenuAddItem(2, "PVP Zone",6,0)
    end
    
    function Gossip_Submenus(Unit, event, player, id, intid, code)
    
    if (intid==999) then 
    Unit:GossipCreateMenu(3543, player, 0)
    
    Unit:GossipMenuAddItem(2, "Exodar",1.1)
    Unit:GossipMenuAddItem(2, "Stormwind",1.2)
    Unit:GossipMenuAddItem(2, "Ironforge",1.3)
    Unit:GossipMenuAddItem(2, "Darnassus",1.4)
    Unit:GossipMenuAddItem(2, "Orgrimmar",2.1)
    Unit:GossipMenuAddItem(2, "Thunder Bluff",2.2)
    Unit:GossipMenuAddItem(2, "The Undercity",2.3)
    Unit:GossipMenuAddItem(2, "Silvermoon City",2.4)
    Unit:GossipMenuAddItem(2, "Shattrath City",3.1)
    Unit:GossipMenuAddItem(2, "Dalaran City",3.2)
    Unit:GossipMenuAddItem(2, "Mall",4.0)
    Unit:GossipMenuAddItem(2, "Level Area",5.0)
    Unit:GossipMenuAddItem(2, "PVP Zone",6.0)
    end
    
    if(intid ==1.1) then
    player:Teleport(530,-4014.080078,-11895.799805,-1.990330)
    Unit:GossipComplete(player)
    end
    
    if(intid ==1.2) then
    player:Teleport(0,-8912.527344,555.110779,93.746529)
    Unit:GossipComplete(player)
    end
    
    if(intid ==1.3) then
    player:Teleport(0,-4980.808594,-881.935547,502.162872)
    Unit:GossipComplete(player)
    end
    
    if(intid ==1.4) then
    player:Teleport(1,9941.639648,2615.429932,1318.160034)
    Unit:GossipComplete(player)
    end
    
    if(intid ==2.1) then
    player:Teleport(1,1502.709961,-4415.419922,21.779274)
    Unit:GossipComplete(player)
    end
    
    if(intid ==2.2) then
    player:Teleport(1,-1285.420044,176.522995,129.994095)
    Unit:GossipComplete(player)
    end
    
    if(intid ==2.3) then
    player:Teleport(0,1831.260010,238.529999,60.520802)
    Unit:GossipComplete(player)
    end
    
    if(intid ==2.4) then
    player:Teleport(530,9414.179688,-7278.970215,14.203432)
    Unit:GossipComplete(player)
    end
    
    if(intid ==3.1) then
    player:Teleport(530,-1722.579956,5382.700195,1.475965)
    Unit:GossipComplete(player)
    end
    
    if(intid ==3.2) then
    player:Teleport(0,271.134705,452.466431,56.960014)
    Unit:GossipComplete(player)
    end
    
    if(intid ==4.0) then
    player:Teleport(0,-8758.700195,-1597.880005,261.823975)
    Unit:GossipComplete(player)
    end
    
    if(intid ==5.0) then
    player:Teleport(0,-8758.700195,-1597.880005,261.823975)
    Unit:GossipComplete(player)
    end
    
    if(intid ==6.0) then
    player:Teleport(0,-8758.700195,-1597.880005,261.823975)
    Unit:GossipComplete(player)
    end
    end
    
    RegisterUnitGossipEvent(90000,1,On_Gossip)
    RegisterUnitGossipEvent(90000,2,Gossip_Submenus)
    Leecher - 08-30-2007 - Contributor - 07-23-2008
    Donator - 06-19-2009
    My website



  6. #6
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Changing the parameters should make no difference (it could be football for all it matters) and your intids are messed up, but I don't see why it's nil on line 5.

  7. #7
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Harrys version works for me, and your original gives the error because you closed the function too early, make sure you've put harrys in and not yours.

Similar Threads

  1. [Trinity] Getting error loading character_database
    By Khaennn in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 09-17-2010, 11:09 AM
  2. [HELP] Getting errors when compileing ascent trunk scripts
    By Fronix in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 03-25-2008, 04:10 PM
  3. [QUESTION] Client Crashes when tries to load modifyed ADT file...
    By evan1 in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 12-08-2007, 10:49 AM
  4. [Question] Getting errors since the last patch.
    By adonai1 in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 10-13-2007, 03:24 PM
  5. getting error when trying to change size
    By kanezfan in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 07-31-2007, 08:57 PM
All times are GMT -5. The time now is 05:14 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search