Thread Tools Display Modes
10-16-09, 06:22 PM   #1
jrwr
A Kobold Labourer
Join Date: Oct 2009
Posts: 1
SecureHandlerWrapScript Help

Code:
handler:Execute( [[
    Spelltocast = "Example"
    secureButton = self:GetChildren()

]] )

SecureHandlerWrapScript(button, "OnClick", handler, 
   
   [[
   	
        secureButton:SetAttribute("spell", "Spelltocast")

   ]]
   
)
My issue with this code so far is how to pass a outside value to Spelltocast

like if a function sets Spelltocast how can SecureHandlerWrapScript Use that Value then

like having spelltocast as a cvar
also as another question

can i use IF like this is lua?

if(true1 && !truebutwanttotestforfalse1) then

Last edited by jrwr : 10-16-09 at 06:53 PM.
  Reply With Quote
10-18-09, 11:04 AM   #2
Soulofsin_007
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 125
You want a button to cast a specific spell? So when you click on it, it will cast it, I.E "Feed Pet"

If thats what I'm getting from your post, then this will help you create buttons that can cast spells.
  Reply With Quote
10-18-09, 11:10 AM   #3
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
Also...
if(true1 && !truebutwanttotestforfalse1) then
if x and not y then
if (x) and (not y) then
if (x and (not y)) then

are all the same -- more or less. You don't need the parentheses unless you need to change the order of operations (generally).
  Reply With Quote
10-24-09, 06:29 PM   #4
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
Only just read this thread, and I'm really finding it hard to understand what your trying to achieve. A quick more indepth description would be helpful.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » SecureHandlerWrapScript Help


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