Welcome Guest. Please Login or Register. Apr 5th, 2018, 10:32pm
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
If you require a dump of the post on your message board, please come to the support board and request it.
WINLIB5
« Thread started on: Apr 28th, 2012, 3:17pm »
Bad subscript in module C:\Program Files\BBC BASIC for Windows\lib\WINLIB5 I also load WINLIB2. I am using FN_button and SYS "SetWindowText", @hwnd%, "SOLITARE" This is a game that I wrote and I use the mouse function for screen position and 7 buttons. It works for many "clicks" then stops with the above message. Is there a limit or can I reset the numbers of "clicks" Ron
Bad subscript in module C:\Program Files\BBC BASIC for Windows\lib\WINLIB5
The most likely cause of a 'Bad subscript' error from WINLIB5 is calling FN_setproc too many times (it supports a maximum of 255 buttons). My guess is that rather than creating your dialogue box template just once, during your program's initialisation phase, you are creating it multiple times and therefore eventually exceeding this limit - you will also be using up memory unnecessarily.
Take particular note of this comment in the Help documentation: "Make sure you only call FN_newdialog once (for each dialogue box); if you need to re-open a dialogue box that has already been opened, simply call PROC_showdialog. Preferably place all your calls to FN_newdialog in an initialisation routine that is only executed once":