Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: VP Mame Safe Cracker Issue  (Read 1123 times)

0 Members and 1 Guest are viewing this topic.

Visitor Q

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1187
  • Last login:May 01, 2019, 09:09:30 am
  • The Saw Is Family
VP Mame Safe Cracker Issue
« on: March 24, 2009, 10:30:40 pm »
When ever I try to play Safe Cracker in VP Mame I get the following error.

Line:671
Variable is undefined: 'KeyStartButton'

Any idea what I need to do to correct this so that I can enjoy this game?

Thanks!

Sub SC_KeyUp(ByVal keycode)
   If keycode = keyStartButton Then Plunger.Fire ' reset the plunger, the first ball must be launch by the player
   If vpmKeyUp(keycode) Then Exit Sub
   If keycode = PlungerKey Then Plunger.Fire
   If keycode = 16 Then
      Controller.Switch(56)=False
   End If
   If keycode = 17 Then
      Controller.Switch(57)=False
   End If
   If keycode = 18 Then
      Controller.Switch(58)=False
   End If
End Sub
« Last Edit: March 24, 2009, 10:39:04 pm by Visitor Q »
“Woe be unto him who opens one of the seven gateways to hell, because through that gateway evil will invade the world."

Visitor Q

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1187
  • Last login:May 01, 2019, 09:09:30 am
  • The Saw Is Family
Re: VP Mame Safe Cracker Issue
« Reply #1 on: March 30, 2009, 07:07:41 am »
Anyone have any ideas?
“Woe be unto him who opens one of the seven gateways to hell, because through that gateway evil will invade the world."

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:March 17, 2025, 11:51:15 am
Re: VP Mame Safe Cracker Issue
« Reply #2 on: March 30, 2009, 07:31:08 am »
"keyStartButton" looks to be a variable which should be set to a constant value somewhere in the code, however, the code cannot locate it so it has no idea what the value of "keyStartButton" is when the game starts.  Based on the code it seems when the player presses the "start button" then the plunger fires thus sending the ball into the play field.   Since the value of the "start button" is unknown then the code cannot figure out when the player pressed the start button.   

Two lines lower in the code it seems pressing the plunger key button will make the plunger fire as well thus sending the ball into the play field as well.   

So, my quick recommendations to you is to:

1)  comment out (or remove) the following line from the code so you can start the game by pressing the plunger button instead of by pressing the start button.

     If keycode = keyStartButton Then Plunger.Fire

OR

2) Figure out a keycode to associate with a "start" button on your panel and change the following line :

       If keycode = keyStartButton Then Plunger.Fire

to be

       If keycode = <<new keycode integer value>> Then Plunger.Fire

« Last Edit: March 30, 2009, 07:35:41 am by unclet »