Thread Tools Display Modes
07-17-14, 09:21 AM   #1
liquidbase
A Warpwood Thunder Caller
 
liquidbase's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 97
Issue with table

Hey to all!

I am currently in the process to implement a direction indicator for the raid frames from DuffedUI, which builds on an existing script.

pointer.lua

The pointer works properly, without this leading to a Lua error. The problem with this script is now that my Click2Cast plugin throws out an error that I do not quite understand.

clickcast.lua

Without the pointer, there is no error.

Lua error:
Lua Code:
  1. 4x DuffedUI-7.993\modules\plugins\clickcast.lua:45: table index is nil
  2. DuffedUI-7.993\modules\plugins\clickcast.lua:45: in function <DuffedUI\modules\plugins\clickcast.lua:45>
  3. <in C code>
  4. DuffedUI-7.993\modules\plugins\pointer.lua:7: in main chunk
  5.  
  6. Locals:
  7. (*temporary) = <unnamed> {
  8.  0 = <userdata>
  9. }
  10. (*temporary) = <function> defined =[C]:-1
  11.  = <function> defined =[C]:-1
  12.  = <function> defined @Interface\AddOns\DuffedUI\modules\plugins\clickcast.lua:45

Maybe someone can help. Thanks in advance for any ideas and help.

greetz
liquid
  Reply With Quote
07-17-14, 09:52 AM   #2
humfras
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 131
Your script doesn't check for frames without a name.
If no name is passed, it will fail at
Lua Code:
  1. ClickCastFrames[_G[name]] = true
__________________
Author of VuhDo CursorCastBar OptiTaunt Poisoner RaidMobMarker
  Reply With Quote
07-17-14, 10:20 AM   #3
liquidbase
A Warpwood Thunder Caller
 
liquidbase's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 97
The interesting thing here is that both scripts continue to work correctly despite the error. If I give a name to the pointer, while the pointer works but not the Click2Cast. And if I delete the "SecureUnitButtonTemplate", the error disappears but the pointer no longer works.
  Reply With Quote
07-17-14, 01:33 PM   #4
liquidbase
A Warpwood Thunder Caller
 
liquidbase's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 97
Solved, after a helping TS-conversation with humfras. Removed UIParent and the template and give the frame a name.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Issue with table


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off