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

How to add an option to Config.ini


boyesjs03
 Share

Recommended Posts

checked these subs?

```

Public Sub SaveOptions()

PutVar App.Path & "\data\options.ini", "OPTIONS", "Game_Name", Options.Game_Name

PutVar App.Path & "\data\options.ini", "OPTIONS", "Port", STR(Options.Port)

PutVar App.Path & "\data\options.ini", "OPTIONS", "MOTD", Options.MOTD

PutVar App.Path & "\data\options.ini", "OPTIONS", "Website", Options.Website

End Sub

Public Sub LoadOptions()

Options.Game_Name = GetVar(App.Path & "\data\options.ini", "OPTIONS", "Game_Name")

Options.Port = GetVar(App.Path & "\data\options.ini", "OPTIONS", "Port")

Options.MOTD = GetVar(App.Path & "\data\options.ini", "OPTIONS", "MOTD")

Options.Website = GetVar(App.Path & "\data\options.ini", "OPTIONS", "Website")

End Sub

```
Link to comment
Share on other sites

options are defined in the optionsrec in modtypes server side.

```

Public Options As OptionsRec

Private Type OptionsRec

Game_Name As String

MOTD As String

Port As Long

Website As String

End Type

```

but would a res option not go clientside?

that file is called config.ini i think.

same principle applies though ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png)

```

' options

Public Options As OptionsRec

' Type recs

Private Type OptionsRec

Game_Name As String

SavePass As Byte

Password As String * NAME_LENGTH

Username As String * ACCOUNT_LENGTH

IP As String

Port As Long

MenuMusic As String

Music As Byte

Sound As Byte

Debug As Byte

End Type

```
Link to comment
Share on other sites

> yes, client options are handled clientside ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png)

Self Explanitory ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Thanks for your help, I was just missing where to define it :-)
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...