Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Code Help?


Furrzie Devine
 Share

Recommended Posts

Okie I wanted a code to help add multiple realms to my game, by simply editing the config.ini, when you click on the name of a diff realm it would change the port so you would logg into that realm. However I'm not really good with visual basics and i think i messed up cuz its not working.. i could really use some help, the code is bellow.

>! Private Sub realmone_Click()
>! Dim fileContents As String = System.IO.File.ReadAllText("\config.ini")
Dim lines() As String
>! fileContents = fileContents.Replace(ControlChars.CrLf, ControlChars.Lf)
>! lines = fileContents.Split(New Char() {ControlChars.Lf, ControlChars.Cr})
>! lines(7) = "the port number here lol"
>! System.IO.File.WriteAllText("\config.ini", String.Join(ControlChars.NewLine, lines))
>! End Sub

And i know I'm a noob but I really need some help, it would be very, VERY appreciated.
Link to comment
Share on other sites

God no. As nice as it is that you're realistic about your own abilities, you seem to be completely unaware of how complex programming a multiplayer online game is.

If you don't know how to program to the point where you're trying to compile .NET syntax in a VB6 IDE then you shouldn't be doing anything nearly as complicated as this.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...