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

[EE 2.7]Ini file, to client side menu


Kite
 Share

Recommended Posts

Ok, so I want to have a sourced quest menu/log.
But I don't know how to have it get info, from a server-sided ini file.

So if someone can show me how to setup it, that would be great.

A re-cap:
Need a client sided quest menu, to get data from a server-sided .ini file.
Link to comment
Share on other sites

```
    Dim f
    f = FreeFile
    Open App.Path & "Scripts\Main.txt" For Input As #f

    Dim text
    text = Input$(LOF(f), f)
    Close #f

    Call SendDataTo(index, "MAINEDITOR" & SEP_CHAR & text & SEP_CHAR & END_CHAR)
```
Here's a clip from the main.txt in-game editor. You can do something like this.
Link to comment
Share on other sites

```
    Dim variableName as Long
    variableName  = FreeFile
    Open App.Path & "Directory\File.txt" For Input As #variableName
```   
This bit is used to open a file of your choosing.

```
    Dim theIniFile as String
    theIniFile = Input$(LOF(variableName), variableName)
    Close #variableName
```
This puts the whole file's text into a string and closes the file.

```
    Call SendDataTo(index, "PacketHeader" & SEP_CHAR & text & SEP_CHAR & END_CHAR)
```
This sends a packet to the player's client. In the client, there would be a check for if the packet's first bit of data is a string that says "PacketHeader". If so, then you'll know that the second bit is the text of that file. Take a look at how something simple like a PlayerMsg is done. Follow the packets from the client to server and back until it ends. It'll give you a good idea of where to start.
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...