Custom function attempt to index field 'repli' (a nil value) menu

Shout-Out

User Tag List

Results 1 to 1 of 1
  1. #1
    ivicask's Avatar Member
    Reputation
    4
    Join Date
    Feb 2010
    Posts
    22
    Thanks G/R
    2/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Custom function attempt to index field 'repli' (a nil value)

    Im trying to add an custom function from another profile to my profile.So i added this code

    Code:
    function repli.Disarm()
    for i=1, #ArenaTars do
    if UnitExists(ArenaTars[i]) 
    and UnitIsPlayer(ArenaTars[i])
    and UnitCanAttack("player",ArenaTars[i]) 
    and UnitPowerMax(ArenaTars[i]) < 200000
    and cdRemains(676) == 0
    and shouldDisarm(ArenaTars[i]) ~= nil 
    and rangeCheck(78,ArenaTars[i])
    then
    CustomTarget = ArenaTars[i]
    CastSpellByName(GetSpellInfo(676),CustomTarget)
    end
    end
    return false
    end
    Into mine functions.lua and at the end of file i added ProbablyEngine.library.register("repli", repli)

    Inside rotaation i added
    Code:
    {"676", { --Disarm
    		"@repli.Disarm()",
    	}},
    And what happens when i hit target i get lua error and addon doesnt work

    Code:
    Message: [string "local target = "target";return ProbablyEngi..."]:1: attempt to index field 'repli' (a nil value)
    Time: 01/18/15 13:27:29
    Count: 7
    Stack: [C]: ?
    [string "local target = "target";return ProbablyEngi..."]:1: in function `func'
    Interface\AddOns\Probably\system\core\library.lua:34: in function `parse'
    Interface\AddOns\Probably\system\core\parser.lua:166: in function `nested'
    Interface\AddOns\Probably\system\core\parser.lua:234: in function `table'
    Interface\AddOns\Probably\system\timers\rotation.lua:31: in function `cycle'
    Interface\AddOns\Probably\system\timers\rotation.lua:79: in function `event'
    Interface\AddOns\Probably\system\core\timer.lua:16: in function <Interface\AddOns\Probably\system\core\timer.lua:11>
    I also tried using "function cutie.Disarm()" as thats which rotation im actually using, but again it crashes with same error.

    Can anyone explain me what im doing wrong and how to add an custom function properly?

    Custom function attempt to index field 'repli' (a nil value)

Similar Threads

  1. [Lua Script] Help with script, index upvalue "NPC_SPAWNER_A" <nil value> ?
    By hinur in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 12-15-2015, 03:00 AM
  2. Writing Custom Functions
    By boxo in forum PE Support forum
    Replies: 18
    Last Post: 12-27-2014, 04:00 PM
  3. PQR Custom Functions problems
    By Alkafir in forum WoW Bots Questions & Requests
    Replies: 3
    Last Post: 07-15-2013, 06:01 AM
  4. [Lua Script] Attempt to index local 'Unit' (a nil value)
    By chris999 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 01-05-2011, 09:58 AM
  5. [Injection] Selecting/customizing functionality to inject
    By Bananenbrot in forum WoW Memory Editing
    Replies: 9
    Last Post: 06-05-2010, 07:37 AM
All times are GMT -5. The time now is 01:32 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