 Rem File: Cmd046.bas
 Rem Sub: Display.Experience
 Rem $Include: 'dndbbs.inc'
 On Error Goto Main.Error
 If Chained<>-2 Then
    Color 15,0
    Print "DNDBBS Command 046 -- Display.Experience."
    Color 7,0
    End
 Endif
 Call Display.ExperienceX
Main.Resume:
 Chain DND.Path+"DNDBBS.EXE"
 End
Main.Error:
 Resume Main.Resume

Sub Display.ExperienceX
 On Local Error Goto Err.Trp6
 Graphics.Off=True
 If UserRecord.Level=False Then
    Strng="You are dead."
    Call IO.O
    Strng="You can use the 'Train' command once free."
    Call IO.O
    Exit Sub
 Endif
 Strng="You are level "+Form$(Cdbl(UserRecord.Level))+"."
 Call IO.O
 If Instr(Str$(UserRecord.Gold),"D") Then
    Strng="You have"+Str$(UserRecord.Gold)+" gold."
 Else
    Strng="You have "+Form$(UserRecord.Gold)+" gold."
 Endif
 Call IO.O
 If UserRecord.Level=32767 Then
    If Instr(Str$(UserRecord.Experience),"D") Then
       Strng="You have"+Str$(UserRecord.Experience)+" experience points."
    Else
       Strng="You have "+Form$(UserRecord.Experience)+" experience points."
    Endif
    Call IO.O
 Endif
 If UserRecord.Level>0 And UserRecord.Level<32767 Then
    Call Gold(Temp#)
    If Instr(Str$(Temp#),"D") Then
       VarQ$=Str$(Temp#)
    Else
       VarQ$=" "+Form$(Temp#)
    Endif
    Strng="You need"+VarQ$+" gold to train for level "+Form$(Cdbl(UserRecord.Level+1))+"."
    Call IO.O
    If Instr(Str$(UserRecord.Experience),"D") Then
       VarQ$=Str$(UserRecord.Experience)
    Else
       VarQ$=" "+Form$(UserRecord.Experience)
    Endif
    If Config2(93)=False Then
       Strng="You need"+VarQ$+" experience points to train for level "+Form$(Cdbl(UserRecord.Level+1))+"."
       Call IO.O
    Else
       Strng="You have"+VarQ$+" experience points."
       Call IO.O
       Call Experience(Temp#)
       If Instr(Str$(Temp#),"D") Then
          VarQ$=Str$(Temp#)
       Else
          VarQ$=" "+Form$(Temp#)
       Endif
       Strng="You need"+VarQ$+" experience points to train for level "+Form$(Cdbl(UserRecord.Level+1))+"."
       Call IO.O
    Endif
 Endif
Err.Rsm6:
 Exit Sub
Err.Trp6:
 Resume Err.Rsm6
End Sub

