[Lua] Got a problem with my Lua code. menu

User Tag List

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

    [Lua] Got a problem with my Lua code.

    Okey so got I got a problem with my Lua code .. It says it wont load in ascent-world.exe . It says like this:
    <could not load>
    scripts/blabla/blablabla.lua:30: unexpected symbol near ´,´


    So ... something isn't supposed to be there. Here you have the Lua code:

    Code:
    function LuaTestSwe_OnCombat(Unit, Event) 
    Unit:SendChatMessage(12, 0, "Hej min mästare! Jag är dum i huvet!")
    end
    
    function LuaTestSwe_Imbazor(pUnit, Event) 
    pUnit:CastSpell(37856, pUnit:GetRandomPlayer(7)) 
    end
    
    function LuaTestSwe_Imbazor2(pUnit, Event) 
    pUnit:CastSpell(31457, pUnit:GetClosestPlayer()) 
    end
    
    function LuaTestSwe_Imbazor3(pUnit, Event) 
    pUnit:CastSpell(43439, pUnit:GetMainTank()) 
    end
    
    function LuaTestSwe_Imbazor4(pUnit, Event) 
    pUnit:FullCastSpellOnTarget(38628, pUnit:GetRandomPlayer(7)) 
    end
    
    function LuaTestSwe_Imbazor5(pUnit, Event) 
    pUnit:CastSpell(31472, pUnit:GetClosestPlayer()) 
    end
    
    function LuaTestSwe_Imbazor6(pUnit, Event) 
    pUnit:CastSpell(45034, pUnit:GetRandomPlayer(0)) 
    end
    
    function _Spawn(pUnit, Event) 
    pUnit:SpawnCreature(, , , , , , ) 
    end
    
    function LuaTestSwe_TransformBerserk(pUnit, Event) 
    pUnit:CastSpell(41924, pUnit:CastOnSelf()) 
    end
    
    function LuaTestSwe_Transform(pUnit, Event) 
    if pUnit:GetHealthPct() < 20 then 
    pUnit:RemoveEvents(); 
    pUnit:FullCastSpell(0)
    pUnit:SetModel(23226)
    pUnit:RegisterEvent("_Spawn",,0)
    end 
    end
    
    function LuaTestSwe_OnLeaveCombat(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(12, 0, "Jag är ju dum i huvet ... Tusan!") 
    end
    
    function LuaTestSwe_OnDied(Unit, Event) 
    Unit:RemoveEvents() 
    Unit:SendChatMessage(12, 0, "Bra gjort!") 
    end
    
    function LuaTestSwe_OnKilledTarget(Unit, Event) 
    Unit:SendChatMessage(12, 0, "Men va tusan ... Du ska ju inte dö! Jag tror jag gör självmord ...") 
    end
    
    RegisterUnitEvent(506612, 1, "LuaTestSwe_OnCombat")
    RegisterUnitEvent(506612, 2, "LuaTestSwe_OnLeaveCombat")
    RegisterUnitEvent(506612, 3, "LuaTestSwe_OnKilledTarget")
    RegisterUnitEvent(506612, 4, "LuaTestSwe_OnDied")
    Please help and tell what the problem is .. If you find any other things that's wrong, please tell. Dunno if that CastOnSelf is a command ... But I want the Npc to cast that spell on him self, just experimented. Thanks in advance.

    And yes I'm Swedish. :yuck:
    Last edited by sammiboy; 09-25-2008 at 08:25 AM. Reason: Lolzzz
    Also Knowned as Samloo


    [Lua] Got a problem with my Lua code.
  2. #2
    Babbaa's Avatar Member
    Reputation
    32
    Join Date
    Nov 2007
    Posts
    206
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    pUnit:SpawnCreature(, , , , , , )

    That's your problem.

  3. #3
    sammiboy's Avatar Member
    Reputation
    10
    Join Date
    May 2007
    Posts
    65
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeh okey, I thought so while also looking more at this. Thanks.

    EDIT: Oh wait wait .. You forgot something: pUnit:RegisterEvent("_Spawn",,0)

    It's fixed now when deleting these two rows. Thanks
    Last edited by sammiboy; 09-25-2008 at 09:10 AM.
    Also Knowned as Samloo


Similar Threads

  1. got a problem with old account
    By ugrolol in forum Report Bugs
    Replies: 5
    Last Post: 09-27-2014, 03:05 AM
  2. [Lua] Problem with my lua code
    By ariax1 in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 09-26-2008, 02:45 AM
  3. Got some problems with my server..Nothing huge..
    By b!atch in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 02-09-2008, 05:04 AM
  4. Got a problem with items in-game.
    By razlken in forum WoW EMU Guides & Tutorials
    Replies: 2
    Last Post: 01-25-2008, 10:44 PM
  5. [Question]Problem with enabling lua
    By Corosive720 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 01-23-2008, 12:01 PM
All times are GMT -5. The time now is 12:16 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