I got error in any keyboard input. i think it will come back to me in the future

i making game on mobile and on other platforms in future, and i got error in any keyboard input.
what thing cause this?

It means that the InputEvent doesn’t have the property position, which you’re trying to access in the first line of the function. That property exists in InputEventScreenDrag and InputEventScreenTouch but not in a lot of other events.

You can put this before line 21 to filter out any events that are neither of the two:

if not event is InputEventScreenDrag and not event is InputEventScreenTouch:
	return

Or just swap the first two if-statements:

if event is InputEventScreenTouch:
	if srzone.get_rect().has_point(event.position - srzone.global_position):

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.