Sub CalculateTime (Score As String, Level As String)
'Declares neccessary components.
Dim TimeBonus As String
Dim FinalScore As String
Dim BeatIn As String
If Score = "" Then
Msgbox ("Please enter a score!", "Error: Empty Score")
Log("Empty Score Detected")
Else If Level = "" Then
Msgbox ("Please select a level!", "Error: Empty Level")
Log("No Level Selected")
End If
If Level = "Tropical Forest" Then
If Score < 2110 Then
Msgbox ("Score is too low", "Score Error")
Log("Too low of a score detected")
Else
FinalScore = Score - 2110
TimeBonus = FinalScore / 30
BeatIn = TimeBonus / 60
If TimeBonus Mod 60 > 0 Then
BeatIn = BeatIn + 1
Msgbox (BeatIn, "Beat Tropical Forest In")
End If
Log("Calculated time needed to beat level")
End If
End If
End Sub