Why input hash is unnamed? (SOLVED)

I added script to game object “player” with:

function init(self)
    msg.post(".", "acquire_input_focus")
end


function on_input(self, action_id, action)
    if action.released == true then
      print("released")
      print(action_id)
      if action_id == hash("tap") then
        print("TAP")
      end
    end
end

and get in Console:

DEBUG:SCRIPT: released
DEBUG:SCRIPT: hash: [unnamed]
DEBUG:SCRIPT: released
DEBUG:SCRIPT: hash: [unnamed]

Why I get action_id “unnamed”?
Space and touch not working at all, on_input not called.

Touch input cannot have the same namn as another action. This is a known bug. Rename it from “tap” and it should work. I think the bug also cancels the mouse button “tap” which is why you see only your “unnamed” action.

Thank you!

Remember that you do not need to have an input binding for TOUCH_MULTI to get single taps. You will get single touch actions as long as you have a MOUSE_BUTTON_1 binding. You only actually need TOUCH_MULTI if you plan to use multi touch.