Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:16 02 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MM Sub error

Author Message
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 12:42pm 15 Apr 2016
Copy link to clipboard 
Print this post

Hi all,

I've tried to add a 2nd options page to my controller based on the park assistant.

I've duplicated the GetThresholds Sub, Lines 233-277 and placed it as GetThresholds2 at lines 279-322.

Added line 273 in GetThresholds Sub so it calls GetThresholds2

Can't see my error.

If I enter Options:-

Choose other Thresholds
Choose Page 2, (was "Finished" originally)
Page 2 options is displayed as expected.
Choose finish,
Original options page is displayed as expected.
Choose Finished again and Original options page is displayed a 2nd time.
Choose finish again and it crashes out.

Console is reporting the error as:-
[227] Exit Sub
Error: Nothing to return to


Can anyone see my error?
Seems to be related to the main options screen being displayed twice, IE not exiting in the first instance of me choosing Finished.

Think plenty of other wanting to build off this code use additional input screens.

Thanks

Phil

2016-04-15_224050_Spa_Controller.zip
Edited by Phil23 2016-04-16
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 999
Posted: 09:46pm 15 Apr 2016
Copy link to clipboard 
Print this post

At lines 101-105 you have a couple of unmatched END IFs.

Also the CONTINUE DO as you can rely on the LOOP further down.
Remark them out and this seems to fix it.



' EndIf

' Continue Do
'EndIf



Regards
Gerry
Latest F4 Latest H7 FotS
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025