lua problem menu

Shout-Out

User Tag List

Thread: lua problem

Results 1 to 10 of 10
  1. #1
    *Alexz*'s Avatar Member
    Reputation
    105
    Join Date
    May 2007
    Posts
    521
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    lua problem

    i made a lua script and when i start server i get this error
    Failed. <couldnot load>
    scripts/boss.lua:3: 'then' expected near 'unit'

    script is


    function phase_1(pUnit, Event)
    if Unit:GetHealthPct() < 90 then
    Unit:RemoveEvents();
    Unit:SetScale(2)
    Unit:RegisterEvent("phase_2",1000, 0)
    end
    end

    function phase_2(pUnit, Event)
    if Unit:GetHealthPct() < 50 then
    Unit:RemoveEvents();
    Unit:FullCastSpellOnTarget(25442)
    Unit:SendChatMessage(12, 0, "ZAP!")
    Unit:RegisterEvent("phase_3",1000, 0)
    end
    end

    function phase_3(pUnit, Event)
    if Unit:GetHealthPct(1)
    Unit:RemoveEvents(); < 1 then
    Unit:CastSpell(34807)
    Unit:SendChatMessage(12, 0, "YOU GOT ME")
    end
    end
    end
    end

    function boss_start(pUnit, Event)
    Unit:RegisterEvent("phase_1",1000, 0)
    end
    RegisterUnitEvent(34500, 1, "boss_start")
    Last edited by *Alexz*; 02-14-2008 at 03:49 PM.

    lua problem
  2. #2
    *Alexz*'s Avatar Member
    Reputation
    105
    Join Date
    May 2007
    Posts
    521
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    [BUMP] anyone know? xD

  3. #3
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    error is here:
    Code:
     function phase_3(pUnit, Event)
    if Unit:GetHealthPct(1)
    Unit:RemoveEvents(); < 1 then
    Unit:CastSpell(34807)
    Unit:SendChatMessage(12, 0, "YOU GOT ME")
    end
    end
    end
    end
    make it look like this:
    Code:
    function phase_3(pUnit, Event)
    if Unit:GetHealthPct() < 1 then
    Unit:RemoveEvents(); 
    Unit:CastSpell(34807)
    Unit:SendChatMessage(12, 0, "YOU GOT ME")
    end
    end
    end
    end


  4. #4
    *Alexz*'s Avatar Member
    Reputation
    105
    Join Date
    May 2007
    Posts
    521
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    kk i did that got a new error-

    failed. <could not load>
    Scripts/boss.lua:25: '<eof>' expected near 'end'

  5. #5
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    take out one of those ends in the part of the script i showed ya like this:
    Code:
    function phase_3(pUnit, Event)
    if Unit:GetHealthPct() < 1 then
    Unit:RemoveEvents(); 
    Unit:CastSpell(34807)
    Unit:SendChatMessage(12, 0, "YOU GOT ME")
    end
    end
    end


  6. #6
    *Alexz*'s Avatar Member
    Reputation
    105
    Join Date
    May 2007
    Posts
    521
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    still geting it xD

  7. #7
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this shouldnt matter but try taking out the semi-colons


  8. #8
    *Alexz*'s Avatar Member
    Reputation
    105
    Join Date
    May 2007
    Posts
    521
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what do you mean?

  9. #9
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the semi-colons: ";"


  10. #10
    *Alexz*'s Avatar Member
    Reputation
    105
    Join Date
    May 2007
    Posts
    521
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    still geting it xD all the other lua script in db work xD

Similar Threads

  1. Lua problem. Look here.. Also newcomers:b
    By b!atch in forum World of Warcraft Emulator Servers
    Replies: 16
    Last Post: 04-18-2008, 07:20 AM
  2. Lua problem
    By Minichili in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 04-14-2008, 09:45 AM
  3. [Help] Lua problem
    By Lich King in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 03-23-2008, 04:34 AM
  4. [Question]-Lua Problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-07-2008, 07:59 AM
  5. [Question] LUA problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-01-2008, 09:21 AM
All times are GMT -5. The time now is 04:48 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