FOOTBALL LEAGUE EDITOR v1.4 Before using this program,you must format a blank disk and use the workbench to name it FOOTBALL This disk MUST be named as EDITOR,to function correctly. If EXIT PROGRAM is selected the EDITOR disk should be present in any drive. If you have any trouble printing files,please refer to the create driver file on this disk. Football league editor was created to,help run a sunday league or school football team.It will,however cope with any of the english league divisions.The new method of calculating league placing's is incorporated into this version and goal difference is no longer used. The calculation works as follows,if two or more teams are level on points,then the goals for,are checked,and the team with the most goals are placed highest,if however,they are still tied after this check,then the goals against are checked and the team with fewer goals scored against them will be placed higher. This could result in the first league game of a season,where only two teams actually play,on the first day,if one team loses 2-0 then that team will be placed bottom of the league,because although it has 0 points,(same as most of the others),it has 2 goals against.Essentially worse off than before it had taken the field.!!! I have found it necessary to limit the lengths of the text in this program,due to screen limitations,I could have used 80 column and subsequently smaller text,but users without monitors would be disadvantaged by the tv resolution. RIGHT NOW TO THE INSTRUCTIONS, This program can be run from the workbench,but bear in mind that the workbench consumes a fair amount of memory,this could cause problems with the effective operation of the program,as it has not been exten- sively tested from workbench.Also some files that ramos needs to run from workbench are not included on this disk,and therefore you may be asked to replace the workbench disk from time to time. When the program boot's up there will be several seconds delay between disk accesses,(so don't be tempted,to whip it out of the drive before it has completed loading!). Once the screen updates you can select the two point or three point system with the mouse. The main menu will then be displayed,and a clock is featured in the top centre of the screen,this can be turned off using the "C" key when on this screen.If you have a battery backed clock the time will be loaded from the startup-sequence,if you don't then the startup-sequence will automatically set the time to zero,and the clock will show elapsed time only. It would be wise,to use a separate data disk for each league you wish to monitor,otherwise things can become very confusing. CREATE LEAGUE:- If a league is already present,it must first be deleted from within the EDIT LEAGUE facility before a new league can be created. Firstly type in the league name,this can be up to 14 characters long, when the league is saved,it is saved under the name entered at this point,next enter the current season,this must be 4 characters long,and should be the year the season starts,(years before 1900 will not be accepted),you will then be asked how many teams in the league,it will accept any numbers between 2-26.Finally you enter the team names,each of these can be up to 13 characters in length,the program will not let the same name be entered twice.you will then be asked for the data disk which,hopefully has previously been named football.The program will then write the four directories it requires to this disk,and return you to the main menu.If another league is created,it will still be necessary,to insert the data disk after creation,as the programs checks the presence of the data directories. VIEW LEAGUE:- This feature is used solely to view the current league positions,just click the mouse to return to the main menu. EDIT LEAGUE:- Upon accessing this feature the league standings will be displayed,with the current league name at the top of the screen. If the right mouse button is pressed,two menu's are displayed,the TEAMS menu shows all the teams in the their current league positions.if you wish to alter any of the information for a team,highlight the chosen team from the menu and release the right mouse button,a window will now display the current data for that team,and a cursor will flash against the team name. If you do not wish to change the information at the cursor position, just press enter and the cursor will move to the next location,type in the new data and press enter,on leaving the last cursor position,the program will re-order the league placings taking into account the new data. The OPTIONS menu allows the league name to be changed,and the current league deleted.If you wish to load another league into the editor,you must use the edit league function to delete the league first,(this also applies to the creation of a new league).Also if you have a score set, in the editor and you delete the league the scores will also be deleted because they are tied to the league.A warning box will be displayed,if the scores have not been saved. NB: If the league name is changed,remember that it will be saved under the new name on the next save,to optimise disk space the old file can be deleted from the disk,using the kill menu from disk access. This also applies to other filename alterations,ie score,team & squad. UPDATE LEAGUE:- If you already have a score set in the database,it will have to be deleted from edit scores,before you can use this facility. This feature is used to key in the scores,the first input is the date the matches were played,this is the date they will be saved under,their filename if you like.When keying this in you are limited to 10 characters. If you wish to leave at this stage,to return to the main menu,you can just type "x" and press enter. Upon entering the date a TEAM menu will become available,select each team in the standard home & away style (ie home team first,then away team).Do this until all the teams you require are displayed on the screen,and select 'done' from the menu.If your league has an odd number of teams and you select them all,you will be unable to proceed,because it's impossible to have a match with only one team.However,if you press 'escape',you will be able to select the teams again,Escape can be pressed at any time,when selecting teams. You will now be asked to input the scores,there are two ways of doing this,by mouse from the menu or via the keyboard,on the right side of the menu are the keystrokes required to enter the scores,there is no method of backtracking,should a mistake be made.The score input works the same as the team input (ie starts top left and proceeds to bottom right). To enter the scorers names,proceed as follows:- After inserting a score,press the HELP key,this will open a window to allow match data insertion,key in each scorer's name at the prompt.The scorers name is limited to 13 characters in length,if you overstep this,there is no warning but the program will trim the name down to the first thirteen characters.If the scorer has scored more than one goal,key in the name as follows:- Smith 2 (ie name,space,number). After entering the scorers,you can enter the attendance (GATE),this is only possible on home teams. It is perfectly viable to enter one teams scorers or all or none,this information will be saved out with the scores under the match date header. If a team scores no goals,it will not be possible to access the scorer window unless it is a home team,in which case you can enter the gate. When all scores have been inserted and you are happy with them,You can update the league,by selecting "YES".If you select "NO" then all of the score information will be cleared and you will have to restart,(So try not to make any mistakes!!!). EDIT SCORES:- Edit scores serves two functions,it is the only way to view the score data,as well as edit it.Two menus are displayed at the left of the screen,and the date of the matches is displayed at top centre. To edit a score,select the team from the left menu and edit as for league data, it should be noted however,that editing score data at this stage will have no effect on the league placings,the only way to alter the league to take into account an edited score,is to edit the league.after editing the score for a particular team,you will input the scorers again,if the EDIT SCORERS,is switched on from the options menu. Again if edit scorers are switched on and the gate parameter contains no data then you will be able to insert some from the editor,but if it already contains data you will not. The scorers can be viewed by using the keyboard symbols displayed on the right side of the teams menu.At the 'press mouse' signal,pressing 'enter' has the same effect. MATCH DATA The match data selection,allows squad creation/edit,team selection/edit & data disk reading. CREATE SQUAD You must have a squad in place,before you are able to select a team,select the new squad item from the menu.if this is selected accidentally just type 'x' at the squad name requester and press enter,this will only happen,if a squad is not already in place.If you wish to create a new squad and there is already a squad present,it must first be deleted from within the squad editor. The squad name can be between 2 and 12 characters long,if it is outside these parameters an appropriate error message will be displayed. Next is the requester to determine the amount of players in the squad this can be between the range 11-22 inclusive. You will then be able to type in the player names for each squad member,these can be full names up to 18 characters in length.Each player in the squad will be given a squad number,it does not matter where the player is in the squad as his team number will be defined later. Once all the players are typed in,the program will return to the team data page. EDIT SQUAD To change a player name,select the player from the squad menu,if no data is typed and enter is pressed then the name will remain unchanged. The ADD MEMBER from the OPTIONS menu,will allow a new player to be added to the squad list,if the total number of players does not exceed 22.The new player will placed at the bottom of the squad list. The ERASE MEMBER from the OPTIONS menu,will display a name menu,select the player,you wish to erase & release the mouse button,if the players squad position was before the bottom position in the squad list,his name will be deleted and the players names will be moved back to fill the gap left by the erased player name.It is not possible to erase a player,if there are only 11 players left in the squad. The DELETE SQUAD from the OPTIONS menu,will bring up a safety box,select 'yes' to delete the squad from the database and 'no' to leave it in place.(Deleting a squad will also delete the current team). This operates as in delete league. The CHANGE SQUAD NAME from the OPTIONS menu will allow the name the squad is saved under to be changed,if no data is typed and enter is pressed the name will remain unchanged. SELECT TEAM To select a team it is necessary to have a league and a squad already in place,using select team then allows you,to select your team from the squad for any given match. You will firstly need to select the home team,then the away team from the league menu. Secondly,key in how many substitutes,you wish to have available this can be between 0-7 inclusive. Thirdly,key in the match date,this can be between 1 and 10 characters in length,and is used as the filename for saving to disk.Because of the amiga disk operating system,certain characters are not allowed as filename characters these will be automatically removed from the filename and replaced with "-",if used. Fourthly,key in the kick off time,length between 1 and 13 characters inclusive. All this information will now be displayed for team selection,select the players from the SELECT TEAM menu,starting with the goalkeeper and working down to the last substitute. When the last substitute has been selected,select done from the menu to return to the TEAM DATA page. All players selected are given 0 points,for their performance in the match,these points can be updated from the team editor,when the match is over.When the points are read by the READ DISK facility,it counts ALL the player points in each team,substitutes are counted as having played and the subs points will taken into account.If you do not wish this,you must use EDIT TEAM when the match is over,to delete subs not used,and re-save it,to disk,this can be done when allocating points. EDIT TEAM You will need a squad,league and team in place to access this feature. The current team data will be displayed for viewing,if you wish to replace a player in the team,you must use one of the substitutes,select the player you wish to replace from the team menu,the substitute menu will now appear,to allow selection of his replacement.The player removed will the be located as a substitute. Also available is the match data menu which allows alteration of the following:- HOME TEAM AWAY TEAM KICK OFF TIME MATCH DATE EXTRA SUB DELETE SUB POINTS DELETE TEAM Home and away teams are selected by mouse,as are substitutes and points,kick off time and match date are keyboard. The points for each player should be entered from the editor,after the match has been played.Ratings out of ten,are given for each players performance. READ DISK The read disk menu,will read the data disk for information,regarding the team data,a safety box will firstly appear,purely to save wasted time. If you wish to view the total player points,from the data disk,then select PLAYER STATS sub menu POINTS or MATCHES.If points are selected,then the data disk will read the teams that have been saved from the current squad,and will sort the players into a list,with the player with the highest points at the top,if MATCHES is selected it will put the player who has played the most matches at the top.In either case,the average number of points per game will be displayed,so if you have allocated your points reasonably accurately,a good indication of your player performance should be evident from this list. This list can be sent to the printer, by pressing the right mouse button,when the list is displayed on the screen,this will bring up the printer safety box,and will dump the whole file out to the printer. The DISPLAY MATCHES selection will also read the data disk and will list all of the current matches on disk to the screen or printer,regardless of league,squad or teams.The information to the screen will list match date & home and away teams,if however the information is sent to the printer the information will be the same plus kick off time. **WARNING** IF YOU SELECT 'YES' FROM THE SAFETY BOX ON EITHER OF THE ABOVE,AND THE PRINTER IS NOT READY THE PROGRAM WILL HANG UNTIL THE COMPUTER IS RESET,OR IF THE PRINTER HAS ALREADY BEEN USED FROM THE PROGRAM,UNTIL IT IS PUT ON-LINE. DISK ACCESS The disk access facility is where most of the work is done,therefore this is where I have decided to store most of the ancillary information. The lower portion of the screen contains,RAM FREE,WORK FREE & DISK FREE. The RAM FREE function tells you how much Random Access Memory is available to your system in bytes.To find Kilobytes (K) divide this number by 1000. The WORK FREE function reports the amount of memory available to the program for storage of names etc,also in bytes. The DISK FREE function will only be displayed if the data disk is inserted into the drive,and will show the amount of disk storage space in bytes. Should any of the above FREE fall below 20k (ie 20000 bytes) a warning box,will display itself every time the screen updates. Above these information boxes,will appear the league,score,squad and team headers as they are loaded,to show which data is currently in the system.To the left of these headers,will appear a boxed 'S'.This 'S' is the save flag,if any of the information in these files is altered then, when the disk access facility is used again the relevant 'S' will disappear,indicating that the information on disk is different from that file which is in the editor.You will then have to decide,if you wish that information saved for future use.If you save it,the 'S' will re-appear beside the relevant file. There are four menu's on the disk access menu table,LOAD,SAVE,KILL & PRINT. LOAD MENU To LOAD a file simply highlight a type from the load menu,this will bring a standard amos file selector into view,this works as follows:- On the top left are two arrows,and a small circle.Do not click the small circle as this is used to display the parent directory.The two arrows can be used to move up & down the list of files. In the centre are the files that are available for selection,with the file master name in the top section of the selector. To the right are four boxes,OK,QUIT,SORT,SETDIR. The SETDIR function should not be used. At the bottom of the selector are two rectangles the first being the name of the directory you are currently using,and the bottom one is used by the filename that is selected by the mouse. To LOAD a file highlight it with the mouse & double click the left mouse button,You can also click on it once and then select the OK box,for the same effect.Selecting QUIT will return you the the editor with no action being taken.Selecting SORT will sort the files into a more acceptable style,but is of limited use. It should be noted,that loading a league,into the editor will remove the current score set and the loading of a squad will remove the current team.ALWAYS save the scores & team data before loading leagues & squads.It therefore goes without saying,(but I will say it anyway!), that the first and second items loaded after boot-up,should be the league & squad. DO NOT PRESS THE RIGHT MOUSE BUTTON WHEN THE FILE SELECTOR IS PRESENT AS THIS WILL CHANGE THE DIRECTORY YOU ARE CURRENTLY USING. IF YOU TRY TO LOAD ANY FILE INTO A PROGRAM LOAD SEQUENCE THAT WAS NOT DESIGNED TO ACCEPT IT,YOU WILL GET A DISK ERROR AND A CORRUPT FILE DISPLAY. SAVE MENU The SAVE menu will automatically save information out to the data disk, if it is present.The information will be sent to the relevant directory ie:- A league saved out will go to the leagues directory,under the league name. A score set saved out will go to the scores directory,under the match date. A squad saved out will go to the squad directory,under the squad name. A team saved out will go to the teams directory,under the match date. Leagues and Scores are linked together by the filename suffix,ie when a score set is saved the current league name is appended to the score set date.This means that if the match date is 29/9/1999 the league name is then added on save out,to produce a filename of 29/9/1999.DIVISION1 It is not possible to load a score set into a league,that it was not saved from,if you try this an appropriate error will be generated.This is also the case for SQUAD and TEAMS.ie the team is linked to the squad. If a file is edited and saved back to disk,under the same date or name then it will overwrite the file already on the disk.Should you not want this to happen,you must alter the file name or date before saving it. KILL MENU KILL is used to wipe a file from the disk,uses the same requester as the load function,if you wipe (kill) a disk file it is gone forever,there is no safety box as the file requester allows you to leave without destroying any files. PRINT MENU Since the print menu is separate,from from the other menu's in this version,there are no safety boxes displayed when selecting a print file option.Therefore the printer must be ready before a selection is made from the print menu. **WARNING** IF YOU SELECT PRINT FILE AND THE PRINTER IS NOT READY THE PROGRAM WILL HANG UNTIL THE COMPUTER IS RESET,OR IF THE PRINTER HAS ALREADY BEEN USED FROM THE PROGRAM,UNTIL IT IS PUT ON-LINE. The program output should work with epson compatible printers using the parallel port,as soon as a selection is made,the printer is sent a series of codes to set a default condition of:- NLQ mode PICA pitch These can be altered as follows,if your printer supports these functions:- The printer default box will now appear,using the mouse,select those modes that are required,some modes will cancel others,when a mode is selected it's box will turn black,unselected it will turn white.Use the left mouse button to select and the right mouse button to de-select. If you wish to escape from the printer box,click the right mouse button on the 'print' lettering,this should then change to read 'abort',then click on it,with the left button and you will go back to the disk access screen. The large printer boxes are self explanatory,the smaller boxes perform as follows:- 'B' BOLD 'I' ITALICS 'O' ORATOR STYLE 'S' SANSERIF STYLE 'F' FORMFEED 'L' LINEFEED 'R' REVERSE 1 inch 'D' DOUBLE HEIGHT CHARACTERS The printer is re-initialized every time a print option is selected,so you will need to select the style of print-out on each occasion. You should click on the lettering of the command you wish to send to the printer as,just clicking inside the box is not sufficient. Once the print type is selected,click the left mouse button on Print at the bottom of the screen to start printing the file. PRINT TEXTLINE The textline operator allows a single line of text to be added to any print option,this is a one shot item (ie is cancelled after execution). Upon highlighting the print textline command in the print menu,the command is toggled on/off,if switched on,operation is as follows:- when a printer option is selected a textline input box will be displayed to allow entry of the desired text up to a maximum of 62 characters,this number of characters will fill the box,any attempt to exceed this number will generate an error,once the text is printed it is deleted from memory,or if it is not printed (ie abort selected from printer menu) then it will be lost. HARD DRIVE USERS Please read the following in it's entirety,BEFORE commencing. To install the league editor onto a hard drive the following steps should be taken:- 1) open a shell or cli window 2) type & press enter 3) type & press enter 4) type & press enter,wait for completion 5) type & press enter 6) type & press enter 7) type & press enter 8) move the cursor towards the top of the script file & press enter twice 9) into the two blank lines type the following:- 10) & move the cursor to the next line 11) & press escape,then press x then press enter 12) It is now necessary to create a drawer on the hard disk to open,for access to the league editor.Find a suitable disk with a drawer on it make sure the drawer name is not already used on the hard drive,A drawer named as empty would be ideal (workbench disk),insert the disk into df0: 13) type & press return 14) type & press return 15) reset the amiga,when the hard drive boots up,use snapshot from the workbench menu to position the editor drawer and it's contents. 16) double click on the league editor Icon to run the editor program 17) If you have a disk named football in the floppy drive,then this will be used for data storage,or data will go to the football directory on the hard drive. 18) If you already have data on a floppy disk & wish to transfer it,to the hard drive directory,open a cli or shell window 19) insert the disk named football into df0: & type:- 20) & press enter,wait for completion Remove disks from floppy drives,before re-setting. The above commands should be entered without the <> operators as they are present to distinguish the commands start and end position,the commands MUST be typed EXACTLY as they are given,with the exeption of 13) & 14) ie if your drawer is not named as empty,the command must be amended to ,whatever the drawer name is. GENERAL There is no need to use the caps lock key when typing data into the editor,as all data is transferred to upper case automatically,by the program,with the exception of the scorer names. The printer codes are held in the STPRINT procedure,if you wish to include a function for your printer,you can look-up the code in the printer manual and alter the procedure to suit. I have had problems while programming this utility from time to time,with an I/O error when trying to send information to the printer,I am unable to find any program errors in the printer routine,so I assume this is a bug in amos.If this happens the only way out is to re-boot the disk. If an error of any sort occurs when the program is running,it will immediately go to the error trap and display the error number.Please let me know if there any errors that cause serious problems.If a disk error occurs,you may get corrupt information into the editor,in this case just use the delete function from the appropriate part of the editor to clear the spurious data. ERROR NUMBERS (0) out of stack space (1) return without gosub (11) out of variable space (20) division by zero (23) illegal function call (24) out of memory (29) overflow error (34) type mismatch (sometimes due to load errors) (80) directory not found (81) file not found (82) illegal filename (84) disc is write protected (86) device not available (88) disc full (92) not an amiga dos disk (93) no disc in drive (94) I/O error (96) file already open (99) input too long (100) end of file PROGRAM DATA In using amos to write this program,I have used the normal amos input routine to receive keyboard data,although this is a little untidy,(akin to the rest of the programming),it saved me writing my own routine,however,it's easy to corrupt the window display by making the entries too long,as a rule there is no need to go to the window border when keying in information. If you need any help to alter the program yourself,just send me a stamped addressed envelope detailing the information you require,and I will write to you by return of post. Alternatively,if you have sent a shareware fee,I will undertake to make the alteration for you,if you so wish. The program on the disc is called League_Editor and can be edited in the amos editor in the normal way.The ramos driver is ramos1.3. post script I can give no guarantees that this program will do the job that you require,or be at all accurate,but it does the job I expected of it.To those of you who have already sent me a shareware fee for version 1,I thank you very much for your integrity. It should also be noted that the files that have been saved from version 1,will not load into this program,such is the price of progress!!!? This program is shareware,if you find it useful,please send a shareware fee to the address below. If you find any bugs or have any queries regarding the program,please let me know at the address below,if you need a reply please include a stamped addressed envelope. Although this program is shareware it may be distributed freely,I have put this message in because,I know it will be anyway. The startup-sequence on this disk can be edited as follows,load the workbench and open a cli window.Type ed df0:s/startup-sequence and press enter (this assumes the program disk is in the internal drive) You will then be confronted with the script file for the disk start up,when you have finished editing it,press escape,then 'x' and finally enter to save to disk. The first call from the startup-sequence is to nopalreset a pd program to eliminate an ntsc screen from being opened instead of a pal screen. It then loads the clock data,if it's available,if not it sets the time to 23:58:55,so that when the program loads the clock reads 00:00:00. It then changes the directory to df0: and runs the league editor. All the best, Tony pps ***** IMPORTANT NOTE ***** I have,in the course of writing this update,received letters from people regarding version 1,although I welcome mail of this nature, I cannot afford to write back to a large number of people,who enclose no SAE or shareware fee,(as in one case,from saudi arabia (60p)).So from the advent of this version,I will be unable to answer,if one of the above is not enclosed with the letter. If you just require a written answer please enclose an SAE. If you require the program re-working please send a shareware fee. HISTORY v1.00 ** prototype ,load,save,print,kill leagues & scores v1.2 ** team data added,better error trapping,better printout procs new separation system & goal difference deleted. v1.3 ** bug removed from update facility,resulting in erroneous league positions (ulp!),screens loaded from disk instead of being held in memory.(more free mem). v1.4 ** change score date,print textline & printer driver creator added,bug fixed in printer routine,RSI demo removed to allow program to run on A500 plus. Tony McManus 23 Peveril Road, Peterborough. England. PE1 3PX.