Chat Room | The online answer processing section is placed in the process of sending a conversation message. Here is the code part of the answer process:
If mid (fstr,i,1) = "#" Then ' Fstr is a string variable that holds the dialog information
Tfstr=mid (fstr,i+1,1)
If CInt (DateDiff ("N", Application ("Questiontime"), Now ()) <=1 Then ' judgment time is valid within 1 minutes
If LCase (TFSTR) =lcase (Application ("Answertrue")) Then ' Determine if the answer is correct
If InStr ("Answername"), Session ("User_username") >0 then ' to determine if the user has already answered the question
Tfstr=session ("User_username") & "has already answered the question!!! "
Else
Tfstr=session ("User_username") & "correct answer!" "
Session ("User_exp") =session ("User_exp") +application ("questioncent") ' Add points to the user of the correct question
Application ("Answername") =application ("Answername") &session ("User_username") & "" ' Save the name of the user who answered the question correctly
End If
Else
If InStr ("Tanswername"), Session ("User_username") >0 then "" to determine whether the user has answered the question
Tfstr=session ("User_username") & "has already answered the question!!! "
Else
Application ("Tanswername") =application ("Tanswername") &session ("User_username") & "" ' Save the name of the user who answered the wrong question
End If
End If
End If