[Lua] Error in script menu

User Tag List

Results 1 to 7 of 7
  1. #1
    Emanuel095's Avatar Active Member
    Reputation
    24
    Join Date
    Jul 2009
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] Error in script

    Hello, everytime i try to run my server i get this error:
    ProfessorPutricide.lua:11: '<eof>' expected near 'end'
    I dont understand what that means



    function ProfessorPutricide_OnCombat(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Good news everyone! I think I've developed a plague that will destroy all life on Azeroth!")
    pUnit:PlaySoundToSet(17114)
    end

    function_ProfessorPutricide_OnLeaveCombat(pUnit, Event)
    pUnit:PlaySoundToSet(17117)
    pUnit:RemoveEvents()
    end


    function ProfessorPutricide_OnKilledTarget(pUnit, Event)
    local chance = math.random(1, 2)
    if (chance == 1) then
    pUnit:SendChatMessage(14, 0, "Hmm... Interesting...")
    pUnit:PlaySoundToSet(17115)
    else
    pUnit:SendChatMessage(14, 0, "That was unexpected!")
    pUnit:PlaySoundToSet(17121)
    end

    function ProfessorPutricide_OnDeath(pUnit, Event)
    pUnit:SendChatMessage(14, 0, "Bad news, everyone! I don't think I'm going to make it")
    pUnit:PlaySoundToSet(17117)
    pUnit:RemoveEvents()
    end


    RegisterUnitEvent(36678, 1, "ProfessorPutricide_OnCombat")
    RegisterUnitEvent(36678, 2, "ProfessorPutricide_OnLeaveCombat")
    RegisterUnitEvent(36678, 3, "ProfessorPutricide_OnKilledTarget")
    RegisterUnitEvent(36678, 4, "ProfessorPutricide_OnDeath")
    Last edited by Emanuel095; 03-07-2010 at 06:20 AM.

    [Lua] Error in script
  2. #2
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Line 11:

    function ProfessorPutricide_OnKilledTarget(pUnit, Event)

    What do we see wrong?

    function
    if
    else
    end

    What are we missing? We need another end.


  3. #3
    Emanuel095's Avatar Active Member
    Reputation
    24
    Join Date
    Jul 2009
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, now it looks like this:

    function ProfessorPutricide_OnKilledTarget(pUnit, Event)
    local chance = math.random(1, 2)
    if (chance == 1) then
    pUnit:SendChatMessage(14, 0, "Hmm... Interesting...")
    pUnit:PlaySoundToSet(17115)
    else
    pUnit:SendChatMessage(14, 0, "That was unexpected!")
    pUnit:PlaySoundToSet(17121)
    end
    end

  4. #4
    Emanuel095's Avatar Active Member
    Reputation
    24
    Join Date
    Jul 2009
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And i still get the same error

  5. #5
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Same error?

  6. #6
    Emanuel095's Avatar Active Member
    Reputation
    24
    Join Date
    Jul 2009
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes i get the same error
    ProfessorPutricide.lua:11: '<eof>' expected near 'end'
    Last edited by Emanuel095; 03-07-2010 at 07:20 AM.

  7. #7
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Well I can't see any problems with it, unless I'm being blind and missing something obvious. I know the latest revisions of ArcEmu/ArcScripts are completely broken so you may want to try downgrading if you find no solution.

Similar Threads

  1. [Lua] Error in script
    By aseroth in forum WoW EMU Questions & Requests
    Replies: 9
    Last Post: 03-07-2010, 06:10 AM
  2. LUA Error.
    By controlsx2 in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 05-07-2008, 04:31 PM
  3. [LUA] Mulgore Creatures Scripted
    By SectorSeven in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 04-11-2008, 01:00 AM
  4. [Lua] Error
    By ~ViVo~ in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 03-15-2008, 11:15 AM
  5. [Errorz] A Lua Error I Havent seen before
    By Snailz in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 02-14-2008, 10:12 AM
All times are GMT -5. The time now is 01:04 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