Problem with lua script :/ please help! menu

User Tag List

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

    Problem with lua script :/ please help!

    Hello i got a problem with my lua script help my! :O this is the lua script sorry for posted in no code :/



    function GodOfWar_OnCombat(Unit, Event)
    unit:SendChatMessage(12, 0, "i will crush everybody in my way! you are finished!")
    unit:RegisterEvent(150002, "GodOfWar_Stomp", 50000, 3)
    unit:RegisterEvent(150002, "GodOfWar_Earthquake", 120000, 5)
    unit:RegisterEvent(150002, "GodOfWar_Crushing Leap", 90000, 6)
    unit:RegisterEvent(150002, "GodOfWar_SummonPlayer", 60000, 2)
    end

    function GodOfWar_OnLeaveCombat(Unit, Event)
    unit:SendChatMessage(12, 0, "Run like chickens! like i always say, you are no match for me! and my power!")
    unit:RemoveEvents()
    end

    function GodOfWar_OnDied(Unit, Event)
    unit:SendChatMessage(12, 0, "NO! this cannot been true? how did i fail?!")
    unit:RemoveEvents()
    end

    function GodOfWar_OnKilledTarget(Unit, Event)
    unit:SendChatMessage(12, 0, "HaHa! Rest in hell!")
    end

    function GodOfWar_Stomp(Unit, Event)
    unit:FullCastSpellOnTarget(58663, Unit:GetRandomPlayer(0))
    end

    function GodOfWar_CrushingLeap(Unit, Event)
    unit:FullCastSpellOnTarget(58963, Unit:GetRandomPlayer(0))
    end

    function GodOfWar_sunbeam(Unit, Event)
    unit:CastSpell(62872, Unit:GetMainTank())
    end
    unit:RegisterEvent(150002, "GodOfWar_sunbeam", 50000, 3)

    function GodOfWar_Earthquake(Unit, Event)
    unit:FullCastSpellOnTarget(19798, Unit:GetRandomPlayer(0))
    end

    function GodOfWar_SummonPlayer(Unit, Event)
    unit:FullCastSpellOnTarget(20477, Unit:GetRandomPlayer(0))
    end

    RegisterUnitEvent(150002, 3,"GodOfWar_OnKilledTarget")
    RegisterUnitEvent(150002, 4,"GodOfWar_OnDied")
    RegisterUnitEvent(150002, 2,"GodOfWar_OnLeaveCombat")
    RegisterUnitEvent(150002, 1,"GodOfWar_OnCombat")


    it says in world : 19:15 N [Arcemu] LuaEngine: scripts/xzgodofwar.lua. . . failed <could not run> scripts/xzgodofwar.lua:34: attempt to index global 'unit' <a nil value> what is the problem? make it a noob friendly answer xD

    Problem with lua script :/ please help!
  2. #2
    Vindicated's Avatar Contributor
    Reputation
    226
    Join Date
    Aug 2008
    Posts
    1,067
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your function argument name doesn't match up with what you are using for that function. In other words, change the word "Unit" to "unit" or vise versa for all the occurrences of that word in the script.


Similar Threads

  1. Problem with Lua scripts!
    By wour55 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 09-12-2010, 04:10 PM
  2. Problem with arcemu-logonserver Please Help!!
    By Jackhenry in forum WoW EMU Questions & Requests
    Replies: 9
    Last Post: 01-27-2010, 01:46 PM
  3. Problem with LUA scripted Mobs
    By foamysquirl in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 07-24-2009, 02:45 PM
  4. Problems with my server, please help me.
    By drsney in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 10-29-2008, 05:37 AM
  5. [Help Plzzzz] LUA Problem with KJ Script
    By Arthas117 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 08-16-2008, 05:25 PM
All times are GMT -5. The time now is 06:20 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search