[Help] lua error menu

Shout-Out

User Tag List

Results 1 to 7 of 7
  1. #1
    Corosive720's Avatar Member
    Reputation
    11
    Join Date
    Nov 2007
    Posts
    156
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help] lua error

    Hey everyone on mmowned i have yet another question to ask.. im building this script and it looks like everything is correct but it when it loads it gives me this error:

    'end' expected <to close 'function' at line 23> near <eof>

    idk how to fix it either here is my script

    Code:
    function High_Priestess_Marli_PBVolley(pUnit, Event)
        if pUnit:GetHealthPct() < 80 then
        pUnit:RemoveEvents()
        pUnit:SendChatMessage(12,0,"You cannot defeat Hakkar's legions!!")
        pUnit:CastSpell(38655)
    end
    
    function High_Priestess_Marli_Enrage(pUnit, Event)
        if pUnit:GetHealthPct() < 10 then
        pUnit:RemoveEvents()
        pUnit:SendChatMessage(12,0,"I SHALL NOT FAIL!")
        pUnit:CastSpell(24109)
        pUnit:Castspell(3391)
    end
    
    function High_Priestess_Marli_Charge(pUnit, Event)
        if pUnit:GetHealthPct() < 60 then
        pUnit:RemoveEvents()
        pUnit:CastSpell(22911, pUnit:GetRandomPlayer())
        pUnit:CastSpell(24112, pUnit:GetClosestPlayer())
    end
    
    function High_Priestess_Marli_CPoison(pUnit, Event)
        if pUnit:GetHealthPct() < 40 then
        pUnit:RemoveEvents()
        pUnit:SetModel(15928)
        pUnit:SetScale(0.3)
        pUnit:SendChatMessage(12,0,"Now you shall see my true form!!")
        pUnit:CastSpell(15952, pUnit:GetMainTank())
    end
    
    function High_Priestess_Marli_OnCombat(pUnit, Event)
        pUnit:SendChatMessage(12,0,"You cannot defeat the Hakkari!")
        pUnit:RegisterEvent("High_Priestess_Marli_PBVolley",45000,0)
        pUnit:RegisterEvent("High_Priestess_Marli_Charge",30000,0)
        pUnit:RegisterEvent("High_Priestess_Marli_CPoison",180000,0)
        pUnit:RegisterEvent("High_Priestess_Marli_Enrage",60000,0)
    end
    
    function High_Priestess_Marli_OnLeaveCombat(pUnit, Event)
        pUnit:RemoveEvents()
    end
    
    function High_Priestess_Marli_OnDeath(pUnit, Event)
        pUnit:RemoveEvents()
        pUnit:SetModel(15220)
        pUnit:SetScale(1)
    end
    
    RegisterUnitEvent (14510, 1, "High_Priestess_Marli_OnCombat")
    RegisterUnitEvent (14510, 2, "High_Priestess_Marli_OnLeaveCombat")
    RegisterUnitEvent (14510, 4, "High_Priestess_Marli_OnDeath")

    [Help] lua error
  2. #2
    Aznex's Avatar Contributor
    Reputation
    128
    Join Date
    Feb 2008
    Posts
    770
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put an end at line 23..obviously

  3. #3
    Corosive720's Avatar Member
    Reputation
    11
    Join Date
    Nov 2007
    Posts
    156
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but why though? its in the middle of the functions

  4. #4
    Aznex's Avatar Contributor
    Reputation
    128
    Join Date
    Feb 2008
    Posts
    770
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm starting to think its because of
    pUnit:CastSpell(22911, pUnit:GetRandomPlayer())
    pUnit:CastSpell(24112, pUnit:GetClosestPlayer())
    Last edited by Aznex; 09-20-2008 at 03:20 PM.

  5. #5
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's because you never put an 'end' to your if statements

  6. #6
    Aznex's Avatar Contributor
    Reputation
    128
    Join Date
    Feb 2008
    Posts
    770
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by TheSpidey View Post
    It's because you never put an 'end' to your if statements
    More lesson learned \o/ ^Ths guy knows literally everything

  7. #7
    Performer's Avatar Contributor
    Reputation
    212
    Join Date
    Nov 2007
    Posts
    874
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fixed one:

    Code:
    function High_Priestess_Marli_PBVolley(pUnit, Event)
        if pUnit:GetHealthPct() < 80 then
        pUnit:RemoveEvents()
        pUnit:SendChatMessage(12,0,"You cannot defeat Hakkar's legions!!")
        pUnit:CastSpell(38655)
        end
    end
    
    function High_Priestess_Marli_Enrage(pUnit, Event)
        if pUnit:GetHealthPct() < 10 then
        pUnit:RemoveEvents()
        pUnit:SendChatMessage(12,0,"I SHALL NOT FAIL!")
        pUnit:CastSpell(24109)
        pUnit:Castspell(3391)
        end
    end
    
    function High_Priestess_Marli_Charge(pUnit, Event)
        if pUnit:GetHealthPct() < 60 then
        pUnit:RemoveEvents()
        pUnit:CastSpell(22911, pUnit:GetRandomPlayer())
        pUnit:CastSpell(24112, pUnit:GetClosestPlayer())
        end
    end
    
    function High_Priestess_Marli_CPoison(pUnit, Event)
        if pUnit:GetHealthPct() < 40 then
        pUnit:RemoveEvents()
        pUnit:SetModel(15928)
        pUnit:SetScale(0.3)
        pUnit:SendChatMessage(12,0,"Now you shall see my true form!!")
        pUnit:CastSpell(15952, pUnit:GetMainTank())
        end
    end
    
    function High_Priestess_Marli_OnCombat(pUnit, Event)
        pUnit:SendChatMessage(12,0,"You cannot defeat the Hakkari!")
        pUnit:RegisterEvent("High_Priestess_Marli_PBVolley",45000,0)
        pUnit:RegisterEvent("High_Priestess_Marli_Charge",30000,0)
        pUnit:RegisterEvent("High_Priestess_Marli_CPoison",180000,0)
        pUnit:RegisterEvent("High_Priestess_Marli_Enrage",60000,0)
    end
    
    function High_Priestess_Marli_OnLeaveCombat(pUnit, Event)
        pUnit:RemoveEvents()
    end
    
    function High_Priestess_Marli_OnDeath(pUnit, Event)
        pUnit:RemoveEvents()
        pUnit:SetModel(15220)
        pUnit:SetScale(1)
    end
    
    RegisterUnitEvent (14510, 1, "High_Priestess_Marli_OnCombat")
    RegisterUnitEvent (14510, 2, "High_Priestess_Marli_OnLeaveCombat")
    RegisterUnitEvent (14510, 4, "High_Priestess_Marli_OnDeath")


Similar Threads

  1. [LUA] Help, keep getting LUA error :(
    By goplay1 in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 03-18-2010, 02:53 AM
  2. [help] Lua Teleporter Error!!
    By Hyldran0 in forum WoW EMU Questions & Requests
    Replies: 11
    Last Post: 12-16-2008, 01:06 PM
  3. [Help] Lua Error (eof)
    By Moffeman in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 06-19-2008, 01:48 PM
  4. [Help] LUA boss script error.
    By arthars1 in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 06-09-2008, 08:23 PM
  5. [HELP] Lua DLL Error
    By Rouslan in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 01-12-2008, 02:02 PM
All times are GMT -5. The time now is 11:55 AM. 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