|
|||
|
There are sample code in the ffish script manual, such as
Code:
//Read all sections from win.ini and write to demo.ini
var ini = new Ini("win.ini");
var demo = new Ini("Demo.ini");
var sect_names = ini.getSectionNames();
var i;
for (i = 0; i < sect_names.length; i++)
{
var sects = ini.getSection(sect_names[i]);
demo.writeSection(sect_names[i], sects);
}
|
|
|||
|
ok.
but how do you get the scrollspeed of this ini for example??? directory : c:\. ini file: Code:
### MAIN SETTINGS ### &scroll_speed=10& &wii_mouse=true& ### GRAPHICS SETTINGS ### &fullscreen=false& &fullscreen_resolution=640x480& &fullscreen_colordepth=32& ### INTERFACE SETTINGS ### &show_time=true& &show_date=true& ### AUDIO SETTINGS ### &default_music=true& |
|
|||
|
Your ini file seems to be malformed. Its content should be something like
Code:
[MAIN SETTINGS] scroll_speed=10 wii_mouse=true [GRAPHICS SETTINGS] fullscreen=false fullscreen_resolution=640x480 fullscreen_colordepth=32 [INTERFACE SETTINGS] show_time=true show_date=true [AUDIO SETTINGS] default_music=true Code:
var ini = new Ini("c:\\my.ini");
var scroll_speed = ini.getString("MAIN SETTINGS", "scroll_speed");
trace(scroll_speed);
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|