[Help] problem with Lua menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Edude's Avatar Member
    Reputation
    98
    Join Date
    Jul 2008
    Posts
    406
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help] problem with Lua

    Hey guys
    I made a Lua Script with GamerX's Lua Script Generator but it is not loading properly.
    Here is the error : Severas.lua...
    failed.<could not load>
    scripts\Severas.lua:9: '<' expected near 'of'


    Here is the script:
    function Severas_OnCombat(Unit, Event)
    Unit:SendChatMessage(12, 0, "How dare you?")
    Unit:RegisterEvent("Severas_Uppercut of death", 50000, 0)
    Unit:RegisterEvent("Severas_Burning Ball", 30000, 0)
    Unit:RegisterEvent("Severas_Stun", 60000, 0)
    Unit:RegisterEvent("Severas_Punishing Shot", 25000, 0)
    end

    function Severas_Uppercut of death(pUnit, Event)
    pUnit:FullCastSpellOnTarget(39069, pUnit:GetRandomPlayer(5))
    end

    function Severas_Burning Ball(pUnit, Event)
    pUnit:FullCastSpellOnTarget(33051, pUnit:GetRandomPlayer(4))
    end

    function Severas_Stun(pUnit, Event)
    pUnit:FullCastSpellOnTarget(5649, pUnit:GetMainTank())
    end

    function Severas_Punishing Shot(pUnit, Event)
    pUnit:FullCastSpellOnTarget(36966, pUnit:GetMainTank())
    end

    function Severas_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end

    function Severas_OnDied(Unit, Event)
    Unit:RemoveEvents()
    Unit:SendChatMessage(12, 0, "I am....too...weak")
    end

    function Severas_OnKilledTarget(Unit, Event)
    Unit:SendChatMessage(12, 0, "Make a good trip to Hell!")
    end

    RegisterUnitEvent(68796, 1, "Severas_OnCombat")
    RegisterUnitEvent(68796, 2, "Severas_OnLeaveCombat")
    RegisterUnitEvent(68796, 3, "Severas_OnKilledTarget")
    RegisterUnitEvent(68796, 4, "Severas_OnDied")
    Hope you guys help me :P

    [Help] problem with Lua
  2. #2
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In a few of the function names, you got spacebars.

    Replace those with _ as example, so it's one name without spacebars, beacuse the loading of the script wont work with a function name that is longer then "one word"

  3. #3
    Edude's Avatar Member
    Reputation
    98
    Join Date
    Jul 2008
    Posts
    406
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So it stays like this?

    function Severas_OnCombat(Unit, Event)
    Unit:SendChatMessage(12, 0, "How dare you?")
    Unit:RegisterEvent("Severas_Uppercut_of_death", 50000, 0)
    Unit:RegisterEvent("Severas_Burning_Ball", 30000, 0)
    Unit:RegisterEvent("Severas_Stun", 60000, 0)
    Unit:RegisterEvent("Severas_Punishing_Shot", 25000, 0)
    end

    function Severas_Uppercut_of_death(pUnit, Event)
    pUnit:FullCastSpellOnTarget(39069, pUnit:GetRandomPlayer(5))
    end

    function Severas_Burning_Ball(pUnit, Event)
    pUnit:FullCastSpellOnTarget(33051, pUnit:GetRandomPlayer(4))
    end

    function Severas_Stun(pUnit, Event)
    pUnit:FullCastSpellOnTarget(5649, pUnit:GetMainTank())
    end

    function Severas_Punishing_Shot(pUnit, Event)
    pUnit:FullCastSpellOnTarget(36966, pUnit:GetMainTank())
    end

    function Severas_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents()
    end

    function Severas_OnDied(Unit, Event)
    Unit:RemoveEvents()
    Unit:SendChatMessage(12, 0, "I am....too...weak")
    end

    function Severas_OnKilledTarget(Unit, Event)
    Unit:SendChatMessage(12, 0, "Make a good trip to Hell!")
    end

    RegisterUnitEvent(68796, 1, "Severas_OnCombat")
    RegisterUnitEvent(68796, 2, "Severas_OnLeaveCombat")
    RegisterUnitEvent(68796, 3, "Severas_OnKilledTarget")
    RegisterUnitEvent(68796, 4, "Severas_OnDied")

  4. #4
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Should be like that, make a try

  5. #5
    Whitethebunny's Avatar Member
    Reputation
    2
    Join Date
    Apr 2008
    Posts
    16
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's what he was saying. Just make sure to use the _ instead of a space. The LUA engine won't recognize a space in the function name.

    Nevermind, beat me to it. Wasn't a response for awhile so I thought I'd answer.

  6. #6
    Edude's Avatar Member
    Reputation
    98
    Join Date
    Jul 2008
    Posts
    406
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks. +rep

Similar Threads

  1. Problem with lua script :/ please help!
    By robinelitenn in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 10-24-2009, 05:10 PM
  2. [HELP] Problem with talents / spells
    By Zido in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 01-24-2008, 09:28 AM
  3. Help Problem with my repack..
    By Tom_2001 in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 01-16-2008, 02:12 PM
  4. [HELP] Problem with MMOwned account..
    By Eskiimo in forum World of Warcraft General
    Replies: 11
    Last Post: 12-31-2007, 07:27 AM
  5. Help.Problems with choose races=(
    By babos15 in forum World of Warcraft General
    Replies: 3
    Last Post: 12-30-2007, 07:48 AM
All times are GMT -5. The time now is 07:18 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