BBC BASIC for Windows
« WINLIB5 »

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.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: WINLIB5  (Read 683 times)
arbykeen13
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 1
xx 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

User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: WINLIB5
« Reply #1 on: Apr 28th, 2012, 4:46pm »

on Apr 28th, 2012, 3:17pm, arbykeen13 wrote:
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":

http://www.bbcbasic.co.uk/bbcwin/manual/bbcwing.html#newdialog

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls