Whenever I use the opt node, it runs as expected, but I get this error: ERROR: Error calling from signal âitem_selectedâ to callable: âControl(Main.cs)::_itlHistorySelectedâ: Method not found.
at: emit_signalp (core/object/object.cpp:1213)
Then when I try to disconnect the signal with this code: btn0.ButtonUp -= () => _btnUp(0);
It doesnât work and the button isstill usable but I also get this error:
ERROR: Attempt to disconnect a nonexistent connection from âbtn0:<Button#32916899293>â. Signal: âbutton_upâ, callable: âDelegate::Invokeâ.
at: _disconnect (core/object/object.cpp:1493)
Could someone please help me figure out these two errors and fix them
You donât needed lambdas, you connect to signals, events, delegates, you cannot disconnect from lambadas if you donât have reference to this lambda.
I think you currently canât, you have to use lambdas.
Remember though that you can mix C# and GDScript scripts together within your project, so if your usecase will benefit from GDScript functionalities, then why not trying to convert that one script to GDScript (or at least part of it)?