Sunku Posted February 7, 2013 Author Share Posted February 7, 2013 I've scrolled through the the source tutorials and didn't see this so I'm putting a tutorial here for anyone that can't figure this out.This is so your game can read the IP and Port from the game it's self instead of the config.iniClient Side Only!Okay, so first off, you'll go to modClientTCP. After that you'll scroll down a bit until you see```Sub TcpInit()' If debug mode, handle error then exit out'If Options.Debug = 1 Then On Error GoTo errorhandlerSet PlayerBuffer = New clsBufferfrmMain.Socket.RemoteHost = Options.IPfrmMain.Socket.RemotePort = Options.Port' Error handler'Exit Suberrorhandler:HandleError "TcpInit", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd Sub```Just change the Options.IP and Options.Port to look like this```frmMain.Socket.RemoteHost = "localhost*"frmMain.Socket.RemotePort = 7001**```* this will be changed to the IP it's connecting to** this will be changed to the port that it's connecting toThere you have it, but if you want to make it so there isn't the IP and Port option in the config, you'll have tofirst go to the config.ini and delete the two lines. Then you'll go to modDatabase and look up:```Public Sub SaveOptions()```Then you can just comment out or delete:```Call PutVar(fileName, "Options", "IP", Options.IP)Call PutVar(fileName, "Options", "Port", Str(Options.Port))```That's all there is to it. Link to comment Share on other sites More sharing options...
Wortel Angels Posted February 7, 2013 Share Posted February 7, 2013 There is already an tut for this and thats HArdcoded ;-)But Nice Link to comment Share on other sites More sharing options...
Sunku Posted February 7, 2013 Author Share Posted February 7, 2013 > There is already an tut for this and thats HArdcoded ;-)> > But NiceDidn't know that, but thanks. Link to comment Share on other sites More sharing options...
abhi2011 Posted February 8, 2013 Share Posted February 8, 2013 There's already a tut on this. But nice anyways. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now