Closed BDevGW closed 5 years ago
probably because you have one event.pull() doing nothing, please try with this code
event = require("event");
while(true) do
eventname, sender, player, data, uuid = event.pull("magData");
io.write("event!");
end
tired, doesn't work :( Also event.pull() pulls every event so all magData events should be pulled too.
yes it pulls the event but doesnt store the data anywhere
remove the first event.pull()
in your code and it will work.
your code requires 2 events to fire so that it prints "event!"
btw. you can run dmesg
on the openos console, to see what events fire.
Oh I misunderstood you, I added only the "magData" to the line... I'm sorry maybe I shouldn't code when I'm half asleep :/
Describe the bug When using the magnetic card reader only every second use pushes the event.
In which environment did the Bug appear? Singleplayer
To Reproduce Steps to reproduce the behavior:
Expected behavior Every time I click with my card the event should be pushed.
Screenshots / Code Snippet Not a screenshot but a shrot (20 sec) video: https://www.youtube.com/watch?v=UJXw8y2bC8U
Minecraft:
Additional context