iasongr Posted December 5, 2020 Share Posted December 5, 2020 Question: When i activate Programming board by manual switch not full working. Landing gears works correct. but system.print("text") and system.showScreen(1) not working. When i activate the programming board by hand (press F on PB) everything works. Any idea why, and how to fix it ? Link to comment Share on other sites More sharing options...
cticer Posted December 5, 2020 Share Posted December 5, 2020 I was having a similar issue, and I have just resolved it. Maybe this will help you too. When I would apply my code to the PB, I would leave it in a deactivated state. When I activated the PB, the code for its start() would run. Then it would deactivate. So when I went to test my button pressed() event, it would never trigger. And so my system.print() calls that were referenced in the pressed() event of my button could never execute. Turns out that the PB must be in an active state for the rest of the code to run. So in my case, I had a bit of a misunderstanding in how the code lifecycle of a PB would execute. So put your PB in active state, and then activate your switch, and then the code you're expecting should run. Link to comment Share on other sites More sharing options...
Helediron Posted December 5, 2020 Share Posted December 5, 2020 See the codex. Several methods which may affect other players unknowingly are restricted to explicitly starting the PB for security reasons. Imagine someone walking by and PB gets triggered with a detector zone. Link to comment Share on other sites More sharing options...
Guest Posted December 5, 2020 Share Posted December 5, 2020 +1. Print and showScreen not working Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now