Hello,
i run into following issue:
Code:
user:/AddOns/FooAddon/FooAddon.lua:5: function expected instead of nil
stack traceback:
user:/AddOns/FooAddon/FooAddon.lua:5: in function '(main chunk)'
when im trying to run this code:
Code:
ADDON_NAME = "Test"
EVENT_MANAGER: RegisterForEvent(ADDON_NAME,EVENT_MOUNTED_STATE_CHANGED, IsOnMount())
-- d(IsMounted("player"))
-- d(onMount)
local function IsOnMount(event, onMount)
if onMount == IsMounted("player")
then d("Mounting")
else d("Unmounting")
end
I'm guessing that it has something to do with "IsOnMount()" not receiving and/or the EVENT_MANAGER not giving away its variables - in this case the EventID and the Boolean value.
This is my first experience in coding in lua, so im glad for any help I can get.
cheers