Subj : Question
To   : Frozen Fire
From : Digital Man
Date : Mon Aug 05 2002 04:30 am

 Re: Question
 By: Frozen Fire to Digital Man on Sun Aug 04 2002 03:25 pm

>  >  > My question, I need the switch to return the appropriate command key t
>  >  > bbs, what function is best suited to do this? i.e. return str (where s
>  >  > command key needed to do what is needed)
>  >
>  > Actually, I think you want to use UNGETKEY.
>  >
>
> I tried UNGETKEY, and the module went into a loop.. here's the tiny mod..
>
> !include sbbsdefs.inc
> !define LAST 3
>
> int m
>
> cmd_home
>
> print "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\
> \b\b"
>
> compare m 0

Stop right there. Why would you be comparing the value of 'm' when you haven't
even set it to anything?

> if_true
>         print "[ Reply"
>         else
>         print "[ Reply"
>         end_if
>
> compare m 1
> if_true
>         print " Reply Mail"
>         else
>         print " Reply Mail"
>         end_if
>
> compare m 2
> if_true
>         print " Next"
>         else
>         print " Next"
>         end_if
>
> compare m 3
> if_true
>         print " Abort ] (?) "
>         else
>         print " Abort ] (?) "
>         end_if

You should use a switch/case block rather than all these compares.

                                                digital man

---
� Synchronet � Vertrauen � Home of Synchronet � telnet://vert.synchro.net