Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do you...
#1
im sry if this is a newb question but i cant seem to find the answer anywhere. How do you get your program to save, edit or read a .txt or .ini file?
Reply
#2
GetVar and PutVar are how it's handled by default server side. Open your server project, and go to modDatabase. That's where most saving and loading takes place.
Reply
#3
could you tell me how you would save them and read and edit them like from scratch. cuz im making a game engine from scratch (actually just a chatroom program right now but it will eventually get to that)
Reply
#4
Google it... 8)
Reply
#5
errrrr... i just went and looked and i still cant seem to find it could you just please tell me what the syntax is to do this for VB6 please
Reply
#6
Code:
Dim FileName As String

    FileName = App.Path & "\Text.ini"
    
    Call PutVar(FileName, "GENERAL", "User", "this is your data being written to the text.ini")
    Call PutVar(FileName, "POOP", "Cheese", "This is your other data being written in a different sub thingy")


Thats basically ripped right out of the server side of MSE1. Look in the server side at PutVar and GetVar.
Reply
#7
ok let me ask this is PutVar and GetVar VB6 syntax or just functions (or subs) that are in the Mirage Source cuz i cant find where these lead to
Reply
#8
i googled it and got a working one in like 5 minutes (one that isn't put/getvar) the one i have takes the whole text file.
Reply
#9
Stomach Pulser Wrote:i googled it and got a working one in like 5 minutes (one that isn't put/getvar) the one i have takes the whole text file.
huh? i dont understand about the whole text file what ever you are talking about.

all i want to know is what syntax is used so that my program can save variables to .ini files, but im NOT using MS i am making my own engine

im sry but now im slightly confused
Reply
#10
Google:

Quote:read write to ini files vb6

Its not hard =P
Reply
#11
Dave Wrote:GetVar and PutVar are MirageSource custom wrappers for the Win32 API functions GetPrivateProfileString and SetPrivateProfileString, respectively

(or something like that, been a while...)

Ok thank you Dave that was all i was wanting to know thank you
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)