LUA script error menu

User Tag List

Results 1 to 2 of 2
  1. #1
    PreciousProtection's Avatar Active Member
    Reputation
    18
    Join Date
    Oct 2010
    Posts
    30
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LUA script error

    Hello, i was writing this script:
    Code:
    function Nex_OnCombat(Unit, Event)
    Unit:SendChatMessage(14, 0, "I am a living death!")
    end
    
    function Nex_OnLeaveCombat(Unit, Event)
    Unit:RemoveEvents() 
    end
    
    function Nex_OnKilledTarget(Unit, Event)
    end
    
    function Nex_OnDied(Unit, Event)
    Unit:RemoveEvents()
    end
    
    RegisterUnitEvent(100132, 1, "Nex_OnCombat")
    RegisterUnitEvent(100132, 2, "Nex_OnLeaveCombat")
    RegisterUnitEvent(100132, 3, "Nex_OnKilledTarget")
    RegisterUnitEvent(100132, 4, "Nex_OnDied")
    its only a SendChatMessage script but only today i started to learn so when i start arcemu world.exe i get no errors on this script but when i come to the mob and start attacking it ingame, it wont speak and arcemu is writing this error: [string "scripts\Nex.lua"] :2: bad argument to 'SendChatMessage' (number expected, got table). So im wondering whats wrong because for me it seems fine, hope someone will answer thanks.

    LUA script error
  2. #2
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Line 2:

    Unit:SendChatMessage(14, 0, "I am a living death!")

    Bad argument, number expected got table:

    SendChatMessage(integer, integer, string)

    So only the first two arguments are number requirements. But you give numbers for both.

    So I do not know why it is thinking you gave it a table

Similar Threads

  1. Lua script error
    By rygarok in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 02-09-2010, 11:35 AM
  2. LUA script error
    By flameworker in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 04-13-2009, 05:16 AM
  3. LUA script error :(
    By lilbdiablo12 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 10-29-2008, 07:45 PM
  4. LUA Script Error, Help would be appreciated!
    By pachuco55 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 06-20-2008, 06:03 PM
  5. [Help me] Lua script error? please help.
    By Szharz in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 03-22-2008, 12:20 PM
All times are GMT -5. The time now is 01:14 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