View Issue Details

IDProjectCategoryView StatusLast Update
0009178Multi Theft Auto : San AndreasClientpublic2018-06-05 00:53
Reportersam46Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
Product Version 
Target VersionConfirmed IssuesFixed in Version 
Summary0009178: unbindKey not working properly
Description

Function unbindKey works properly only until you bind the same command (function) again to another key.

Test script result:
Both keys ("1", "2") will call "test2" command.
PS: The same result on the server-side.

Steps To Reproduce

Test script (runcode, client-side):

setTimer(function()
addCommandHandler("test2", function() outputDebugString("test") end)
bindKey("1", "down", "test2")
unbindKey("1", "down", "test2")
bindKey("2", "down", "test2")
end, 50, 1)

TagsNo tags attached.

Activities

qaisjp

2016-03-08 20:10

administrator   ~~0024514

What's going on with the timers there?

stumpy

2016-09-29 01:26

viewer   ~~0025255

Last edited: 2016-09-29 01:26

View 2 revisions

image for simplified illustration:
http://prntscr.com/cnkiio

All binds with the self command would be unbinded, also these from other keys.
If you bind the same command again (to same key or different) all binds are back, also the unbinded one.

But looking on the picture is easier.

arranTuna

2018-02-15 16:32

manager   ~~0026430

Last edited: 2018-02-15 16:33

View 2 revisions

Confirmed and only need:

addCommandHandler("test2", function() outputChatBox("test") end)
bindKey("1", "down", "test2")
unbindKey("1", "down", "test2")
bindKey("2", "down", "test2")

Chatbox better since identical debug spam message is no longer shown in debugscript.

einheit-101

2018-06-04 19:36

reporter   ~~0026549

This utterly bugged key binding HAS to be fixed, its an extreme mess and players+scripters complain about it.
unbindKey pretty much doesnt work at all.

ccw

2018-06-04 22:32

administrator   ~~0026550

Try https://nightly.mtasa.com/mtasa-1.5.5-full_rc-12000-20180604.exe

einheit-101

2018-06-05 00:53

reporter   ~~0026551

Thank you, first tests do actually work but i think more testing is needed in order to verify it working 100%!

Issue History

Date Modified Username Field Change