#180330 - 2007-09-10 05:20 AM
help need variable from ini
|
thunderchero
Fresh Scripter
Registered: 2007-09-08
Posts: 14
Loc: USA
|
Help again,
I need to set a variable from an ini file. right now I want to use $rom as variable, ini file name is "stbof.ini". also the path variable I am using to ini file is "$install+" And ini file looks like this;
CDPATH=F:\ HDPATH=C:\botf\ CURRENTGAME=0 LANGUAGE=ENGLISH VICTORY=KILLALL INSTALL=MAXIMUM 3D=DIRECT3D TACTICAL=DETAILED SOUNDON=ON
I need Variable to be "F:\" "or what ever is in ini"
if any one can get me the right script it would be great.
thunderchero
|
Top
|
|
|
|
#180333 - 2007-09-10 05:30 AM
Re: help need variable from ini
[Re: Les]
|
thunderchero
Fresh Scripter
Registered: 2007-09-08
Posts: 14
Loc: USA
|
that is all that is in the ini
thunderchero
Edited by thunderchero (2007-09-10 05:32 AM)
|
Top
|
|
|
|
#180335 - 2007-09-10 05:54 AM
Re: help need variable from ini
[Re: Les]
|
thunderchero
Fresh Scripter
Registered: 2007-09-08
Posts: 14
Loc: USA
|
It is not of my making it was made in 1999
thunderchero
|
Top
|
|
|
|
#180336 - 2007-09-10 06:02 AM
Re: help need variable from ini
[Re: thunderchero]
|
thunderchero
Fresh Scripter
Registered: 2007-09-08
Posts: 14
Loc: USA
|
Ok If I make ini look like this;
[settings] CDPATH=F:\ HDPATH=C:\botf\ CURRENTGAME=0 LANGUAGE=ENGLISH VICTORY=KILLALL INSTALL=MAXIMUM 3D=DIRECT3D TACTICAL=DETAILED SOUNDON=ON
the next time game starts it removes it so would that work?
thunderchero
|
Top
|
|
|
|
#180338 - 2007-09-10 06:06 AM
Re: help need variable from ini
[Re: thunderchero]
|
thunderchero
Fresh Scripter
Registered: 2007-09-08
Posts: 14
Loc: USA
|
ReadProfileString() was what I was tring to use But never got it to work now I know why. but please still help me.
thunderchero
|
Top
|
|
|
|
#180360 - 2007-09-10 05:20 PM
Re: help need variable from ini
[Re: Les]
|
thunderchero
Fresh Scripter
Registered: 2007-09-08
Posts: 14
Loc: USA
|
Les,
I got the second one (read file) to work for me. Had to create folder in my install folder and copy the ini into folder so it would read from full path.
Thanks thunderchero
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 466 anonymous users online.
|
|
|