Thread: Keybinding
View Single Post
04/19/22, 04:05 PM   #1
Askedal
Join Date: Aug 2017
Posts: 9
Keybinding

Hi,

I'm currently working on an updated version of SmarterAutoLoot and have a problem to get the key binding to work. I have a binding.xml as

Code:
<Bindings>
	<Layer name="SI_KEYBINDINGS_LAYER_GENERAL">
		<Category name="Smarter Autoloot">
			<Action name="SAL_TOOGLE">
				<Down>SmarterAutoLoot:SALToggle</Down>  
			</Action>
		</Category>
	</Layer>
</Bindings>
and a function

Code:
function SmarterAutoLoot:SALToggle()
	self.db.enabled = not self.db.enabled
	self:ToggleAutoLoot()
end
that should be called to swith off the AddOn on the fly. In the key binding setting I see the entry for my AddOn and can assign a key to it. But when I start the game the only thing I get is an UI error

Code:
:1: function arguments expected near '<eof>'
What is wrong with this type of construct, do I oversee something ?

Many thanks

Askedal
  Reply With Quote