Mirage Engine
How do you... - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: How do you... (/showthread.php?tid=1701)



How do you... - Pbcrazy - 24-04-2008

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?


Re: How do you... - Rian - 24-04-2008

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.


Re: How do you... - Pbcrazy - 24-04-2008

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)


Re: How do you... - Stomach Pulser - 24-04-2008

Google it... 8)


Re: How do you... - Pbcrazy - 24-04-2008

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


Re: How do you... - Anthony - 24-04-2008

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.


Re: How do you... - Pbcrazy - 24-04-2008

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


Re: How do you... - Stomach Pulser - 25-04-2008

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.


Re: How do you... - Pbcrazy - 25-04-2008

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


Re: How do you... - Coke - 25-04-2008

Google:

Quote:read write to ini files vb6

Its not hard =P


Re: How do you... - Pbcrazy - 25-04-2008

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