OK, I'm modifing my default.src to show a defferent level menu for a level 10 user. What Im trying to do is if the user is expert, it goes to the next section of the default.src after the snippit. If they are not expert, it check to see if they are level 10, if so, show them the level 10 menu, if not level 10, take them to the other levels.
What it's doing is if expert mode, the bbs goes offline, if not in expert, all I see is the prompt, no menu. WHere have I gone wrong.
------------ Snippit -------------- ------ My Reasoning ------------- # Display TEXT\MENU\MAIN.* if not in expert mode
compare_user_misc UM_EXPERT 1. Compare for expert
if_false 2. If not expert, find user level
compare_ars level 10 3. comparing levels
if_equal 4. if level 10
cls 5. clear screen
menu main_10 6. show level 10 menu
else 7. If not level 10
cls 8. clear screen
menu main 9. show default menu
end_if 10. end of user level comparison. if_true 11. if expert mode is true, goto ------------ End Of Snippit --------- next section of default.src
Re: Flow
By: DesotoFireflite to All on Thu Jun 09 2022 04:20 pm
OK, I'm modifing my default.src to show a defferent level menu for a
level 10 user. What Im trying to do is if the user is expert, it goes
to the next section of the default.src after the snippit. If they are
not expert, it check to see if they are level 10, if so, show them the
level 10 menu, if not level 10, take them to the other levels.
What it's doing is if expert mode, the bbs goes offline, if not in
expert, all I see is the prompt, no menu. WHere have I gone wrong.
------------ Snippit -------------- ------ My Reasoning
------------- # Display TEXT\MENU\MAIN.* if not in expert mode
compare_user_misc UM_EXPERT 1. Compare for expert
if_false 2. If not expert, find user
level compare_ars level 10 3. comparing levels
if_equal 4. if level 10
cls 5. clear screen
menu main_10 6. show level 10 menu
else 7. If not level 10
cls 8. clear screen
menu main 9. show default menu
end_if 10. end of user level
comparison. if_true 11. if expert
mode is true, goto ------------ End Of Snippit --------- next
section of default.src
You have 3 if's in that snippet, but only one end_if.
I think what you mean to write was:
compare_user_misc UM_EXPERT
if_false
compare_ars level 10
if_equal
cls
menu main_10
else
cls
menu main
end_if
else
...
end_if
Notice there is an end_if for ever if.
Sysop: | MarisaG |
---|---|
Location: | South San Francisco, CA |
Users: | 5 |
Nodes: | 10 (0 / 10) |
Uptime: | 230:42:23 |
Calls: | 123 |
Files: | 36 |
Messages: | 30,547 |