Donations keep our forum going! You get some nifty perks with it too!
0 Members and 0 Guests are viewing this topic.
Been working on this all weekend. Oh god the headache this map is bringing me
Quote from: blinxis on June 17, 2012, 02:51:58 AMBeen working on this all weekend. Oh god the headache this map is bringing me OhhhhhhWhat is thou making in SourceSDK? Does it look to me a Counter strike map?
Helping my granddad with the computer
Play Modern Warfare 3 on X-Box 360Currently snipeing on Mission.... 13-0
Private Sub UpdateHighScoreFile(ByVal newscore As Long, ByVal newName As String) 'Open File as Read/Write 'Readline ' Read the information into a single string Dim objReader As New System.IO.StreamReader("./Highscore.txt") Dim fileString As String = objReader.ReadToEnd() objReader.Close() objReader.Dispose() 'Dim line As String Dim LINES As String() = fileString.Split(New Char() {vbNewLine}) 'Dim NewLines As String() Dim HighScoreCount As Long Dim L2 As Long = 0 Dim S2(0 To 9) As String Dim HighScoreName As String Dim txtHighScoreValue As String Dim lHighScoreValue As Long HighScoreCount = 1 For HighScoreCount = 1 To 10 HighScoreName = Mid(LINES(HighScoreCount), 1, 10) txtHighScoreValue = Mid(LINES(HighScoreCount), 11, 10) lHighScoreValue = CLng(txtHighScoreValue) If newscore >= lHighScoreValue Then S2(L2) = HighScoreName & CStr(newscore) Else S2(L2) = LINES(HighScoreCount) L2 += 1 End If Next ' Convert the input string into an array Dim theArray As Char() = fileString.ToCharArray() 'Dim theArray2 As String() = fileString.ToDictionary(Of Long, String)() 'Dim Scores As new Dictionary(of long,String) From fileString.ToDictionary(Of Long, String) ' Declare a resultString to hold the value Dim resultString As String = "" ' Increment each item in the string Dim curChar As Char For i As Integer = 0 To (theArray.Length - 1) curChar = theArray(i) If (Char.IsLetterOrDigit(curChar)) Then theArray(i) = Chr(Asc(curChar) + 1) End If Next ' Convert the modified array back to a string Dim newString As String = New String(theArray) newString = "Fred,1000" & vbCrLf & "nJack,2000" ' Write the array to somefile-out.txt Dim objWriter As New System.IO.StreamWriter("./Highscore.txt") objWriter.Write(newString) objWriter.Close() objWriter.Dispose() End Sub