06-02-2023, 03:50 AM
(This post was last modified: 06-02-2023, 03:52 AM by NasaCow.
Edit Reason: Grammar be important
)
I am trying to control exiting to prevent work from getting loss and adding some basic code related to EXIT is having my program crash out with Error 10 - Duplicate definition (The error points to the label ShutDown). I tried to step through it to see how the program flows exactly but with no success. Is running the timer all the time to check a bad idea for complex programs? Getting it to work with a simple loop seems to be no problem, inserting into Grade Keeper seems to be breaking something...
Quote:'Disabling the default exit routinue
ExitFlag = EXIT
ON TIMER(1) GOSUB ShutDown
TIMER ON
...
ShutDown:
ExitFlag = EXIT
IF ExitFlag THEN SYSTEM
RETURN
WHILE NOT EndOfLife(1)
HappyLife = HappyWife - (Money * Time * Travel * Gifts)
Kids = (NoTime * LackOfLove) MOD NumOfKids
IF Retirement <> Rich THEN YearsOnJob = YearsOnJob + 1 ELSE SeeTheWorld
WEND
HappyLife = HappyWife - (Money * Time * Travel * Gifts)
Kids = (NoTime * LackOfLove) MOD NumOfKids
IF Retirement <> Rich THEN YearsOnJob = YearsOnJob + 1 ELSE SeeTheWorld
WEND