 Rem File: Cmd159.bas
 Rem Sub: Edit.Room
 Rem $Include: 'dndbbs.inc'
 On Error Goto Main.Error
 If Chained<>-2 Then
    Color 15,0
    Print "DNDBBS Command 159 -- Edit.Room."
    Color 7,0
    End
 Endif
 If TempX!>SFalse And TempX!<=Lof(RoomFile)/RoomRecLen Then
    Call Edit.Room
    UserRecord.ObjectsCreated(7)=UserRecord.ObjectsCreated(7)+1#
    If Debug.Mode Then
       Strng="Write to logfile."
       Call IO.O
    Endif
    Close #TempFile1
    Filename$=DND.Path+"created.dat"
    Open Filename$ For Append Shared As #TempFile1
    Var$=Lcase$(Rtrim$(UserRecord.CodeName))
    Mid$(Var$,1,1)=Ucase$(Mid$(Var$,1,1))
    Var$=Var$+" edited room"+Str$(TempX!)+" on "
    Var$=Var$+Format$(Now,"mm-dd-yyyy")+" "+Format$(Now,"hh:mm:ss")
    Print #TempFile1, Var$
    Close #TempFile1
 Else
    Strng="Room number out of range."
    Call IO.O
 Endif
Main.Resume:
 Chain DND.Path+"DNDBBS.EXE"
 End
Main.Error:
 If Debug.Mode Then
    Strng="Error:"+Str$(Err)
    Call IO.O
 Endif
 Resume Main.Resume
