[Errorz] A Lua Error I Havent seen before menu

Shout-Out

User Tag List

Results 1 to 3 of 3
  1. #1
    Snailz's Avatar Contributor Authenticator enabled
    Reputation
    239
    Join Date
    Nov 2007
    Posts
    941
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Errorz] A Lua Error I Havent seen before

    Hey Guys Im Stuck trying to load My Luas It always Says the error ive never had Before and its this :

    Uninspected Argument Near "Unit"

    Heres my script for help :
    Code:
    function Boss_Phase1(Unit, event)
        if Unit:GetHealthPct() < 95 then
            Unit:RemoveEvents()
            Unit:GetClosestPlayer
            Unit:SendChatMessage(12, 0, "Youre Trying to kill me Ha You dont have a chance!")
            Unit:CastSpell(37202)
            Unit:CastSpell(30505)
            Unit:RegisterEvent("Boss_Phase2",1000, 0)
        end
    end
    
    
    
    function Boss_Phase2(Unit, event)
        if Unit:GetHealthPct() < 70 then
            Unit:RemoveEvents()
            Unit:GetMainTank()
            Unit:SendChatMessage(12, 0, "Youre Good at Tanking &#37;N arnt you Well i gues thats gonna have to end!")
            Unit:SetScale(2)
            Unit:Emote(11)
            Unit:CastSpell(32964)
            Unit:CastSpell(32963)
            Unit:RegisterEvent("Boss_Phase3",1000, 0)
        end
    end
    
    
    function Boss_Phase3(Unit, event)
        if Unit:GetHealthPct() < 50 then
            Unit:RemoveEvents()
            Unit:SetScale(2.5)
            Unit:GetClosestPlayer()
            Unit:CastSpell(36826)
            Unit:CastSpell(36826)
            Unit:CastSpell(36826)
            Unit:CastSpell(36826)
            Unit:CastSpell(36826)
            Unit:SendChatMessage(12, 0, "You Think you can beat the master of elements?..well youre wrong")
            Unit:RegisterEvent("Boss_Phase4",1000, 0)        
    
        end
    end
    
    
    function Boss_Phase4(Unit, event)
        if Unit:GetHealthPct() < 30 then
            Unit:RemoveEvents()
            Unit:SetScale(1.5)
            Unit:GetMainTank()
            Unit:CastSpell(40157)
            Unit:CastSpell(40157)
            Unit:CastSpell(40157)
            Unit:SendChatMessage(12, 0, "Im Sorry Mr Tank Youre Time Has come to a end!")
            Unit:RegisterEvent("Boss_Phase5",1000, 0)        
    
        end
    end
    
    
    
    function Boss_Phase5(Unit, event)
        if Unit:GetHealthPct() < 10 then
            Unit:RemoveEvents()
            Unit:SetScale(1)
            Unit:CastSpell(22009)
            Unit:SendChatMessage(12, 0, "Noo now im the one d..d.dieing..!")
         
    
        end
    end
    
    
    function Boss_OnCombat(Unit, event)
        Unit:SendChatMessage(11, 0, "Ill Shall Be Rid Of You soon")
        Unit:RegisterEvent("Boss_Phase1",1000, 0)
        Unit:RegisterEvent("Boss_Phase2",1000, 0)
        Unit:RegisterEvent("Boss_Phase3",1000, 0)
        Unit:RegisterEvent("Boss_Phase4",1000, 0)
        Unit:RegisterEvent("Boss_Phase5",1000, 0)
    end
    
    
    function Boss_OnLeaveCombat(Unit, event)
        Unit:RemoveEvents()
        Unit:SendChatMessage(11, 0, "You Are Makeing me Laugh")
        Unit:SetScale(1)
    
    end
    
    
    function Boss_OnKilledTarget(Unit)
        Unit:SendChatMessage(11, 0, "Youre Kills heal me and make me stronger!")
        Unit:CastSpell(13048)
        Unit:CastSpell(9163)
        Unit:CastSpell(9163)
        Unit:CastSpell(9163)
        Unit:CastSpell(9163)
        Unit:CastSpell(9163)
        Unit:CastSpell(9163)
    end
    
    
    function Boss_Death(Unit)
        Unit:SendChatMessage(12, 0, "Oh..No...I..Am..The Master...Agh..cusrse you")
        Unit:RemoveEvents()
        Unit:SetScale(1)
    
    end
    
    RegisterUnitEvent(500005, 1, "Boss_OnCombat")
    RegisterUnitEvent(500005, 2, "Boss_OnLeaveCombat")
    RegisterUnitEvent(500005, 3, "Boss_OnKilledTarget")
    RegisterUnitEvent(500005, 4, "Boss_Death")
    #

    Pl0x Help
    Ty
    Snailz

    Found It lal Pwnt anyway if you get this Error remember to Put the () at the end T_T
    Last edited by Snailz; 02-14-2008 at 03:52 AM.
    Cheese Cake?

    [Errorz] A Lua Error I Havent seen before
  2. #2
    Snailz's Avatar Contributor Authenticator enabled
    Reputation
    239
    Join Date
    Nov 2007
    Posts
    941
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sigh i think i might gust of found it as well T_T
    Cheese Cake?

  3. #3
    Peter1337's Avatar Member
    Reputation
    4
    Join Date
    Dec 2007
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I thinks your mistake is the red marked thing:

    function Boss_Phase1(Unit, event)
    if Unit:GetHealthPct() < 95 then
    Unit:RemoveEvents()
    Unit:GetClosestPlayer
    Unit:SendChatMessage(12, 0, "Youre Trying to kill me Ha You dont have a chance!")
    Unit:CastSpell(37202)
    Unit:CastSpell(30505)
    Unit:RegisterEvent("Boss_Phase2",1000, 0)
    end
    end
    you want that he casts the spells on his closest player or? then try out this:

    function Boss_Phase1(Unit, event)
    if Unit:GetHealthPct() < 95 then
    Unit:RemoveEvents()
    Unit:SendChatMessage(12, 0, "Youre Trying to kill me Ha You dont have a chance!")
    Unit:CastSpell(37202,unit:GetClosestPlayer(X))
    Unit:CastSpell(30505,unit:GetClosestPlayer(X))
    Unit:RegisterEvent("Boss_Phase2",1000, 0)
    end
    end
    now just replace the X with one of the numbers:
    RANDOM_ANY = 0,
    RANDOM_IN_SHORTRANGE = 1,
    RANDOM_IN_MIDRANGE = 2,
    RANDOM_IN_LONGRANGE = 3,
    RANDOM_WITH_MANA = 4,
    RANDOM_WITH_RAGE = 5,
    RANDOM_WITH_ENERGY = 6,
    RANDOM_NOT_MAINTANK= 7
    source: Units Commands - Ascent Wiki

    you also have to replace the Unit:GetMainTank() thing. But i think if you just leave it out he should cast the spells on the maintank because actual its his target.
    Last edited by Peter1337; 02-14-2008 at 10:16 AM.

Similar Threads

  1. Help DBC error i've never seen before
    By mager1794 in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 07-30-2008, 06:44 PM
  2. LUA Error.
    By controlsx2 in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 05-07-2008, 04:31 PM
  3. [Lua] Error
    By ~ViVo~ in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 03-15-2008, 11:15 AM
  4. Creature I have never seen Before- Stone tiger?
    By karlov in forum World of Warcraft Exploration
    Replies: 14
    Last Post: 11-06-2007, 04:53 PM
  5. Zul'Aman Pics for those who havent seen it
    By Chrisx in forum World of Warcraft Exploration
    Replies: 16
    Last Post: 10-14-2007, 08:44 PM
All times are GMT -5. The time now is 06:30 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