Strange Behavior of Subroutine

GeorgeH

Flippered Out
Site Supporters
Joined
May 3, 2016
Messages
3,130
Solutions
7
Reaction score
2,488
Points
145
Favorite Pinball Machine
Attack From Mars
I have a subroutine "CheckLightSettings()" that turns on the lighting on my table. I can set up a keycode and press it to run this subroutine after the game starts and the lighting turns on. So I figure I can add a call to run the sub when you press the start game key and make it run instead of having to press the keycode. For some reason, the sub won't run. So I decided to add a timer to make the sub run a little after the game start key is pressed. That didn't work either. The only thing that makes the sub run is to use a keycode that contains "CheckLightSettings()".

Have any of you guys ever experienced a problem like this? I admit that my lighting is pretty complex but it seems like any time you add a call to run a sub it should run. The lighting includes a flasher that is set up to be a spotlight which is one of the lights that won't turn on.
 
Last edited:
Send me the table and I'll have a look to it (if you want).
 
Send me the table and I'll have a look to it (if you want).

I finally figured it out. I added the flashers for GI to a sub where they get turned off. I have another sub for turning the lights on but I had the GI flashers turning on in a different sub. Everything started working when I moved the GI flashers to the sub where the lights are turned on.

Over the years, I have added to the lighting I use in a piece mean fashion. It has progressed to a point where it has become very complex. I need to rethink the structure I use for the lighting but I think I can do that on my own. I will ask for help if I can't figure the best structure for it.

Thanks for offering JP!
 
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
  • Quote
  • xenonph @ xenonph:
    I sent you message with pic showing where to make visible adjustment.
    Quote
  • Chat Bot Mibs Chat Bot Mibs:
    Pinped has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    daleks12 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Stephen has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    docdoc has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Exnihilo_Mundus has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    angmarg52 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    tully619 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    smorndb has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Tech49 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Topsi Klaus has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Forsaken43 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    duduky72 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Gerge has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    nunolilo has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    DavidT2025 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Gary-7 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Thunderbird has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    alug has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    bluebird has left the room.
  • HZR @ HZR:
    It’s nice to go all see a place I can play actual machines!!!!
    Quote
  • Chat Bot Mibs Chat Bot Mibs:
    Sunrise74 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Rai has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    liebowa has left the room.
      Chat Bot Mibs Chat Bot Mibs: liebowa has left the room.
      Back
      Top