MODULE: IniFile

Started by RickJ, Thu 27/01/2005 18:24:15

Previous topic - Next topic

RickJ

AGS v2.7+ has a new feature allowing script modules to be created and used in a fashion similar to plug-ins.  So I took the liberty of making a module that provides support for reading INI configuration files, similar to the acsetup.cfg file AGS uses.  This was brought up a couple of months ago in a thread by Radiant.

Here is a link to the module.  I have included my test game for convenience.  Just unzip it to a game folder and open it with the AGS editor and do a Game->Test.  Have a look and let me know what you think.  Also please also comment on coding, documenting,  and publishing modules and in general.

Download here
Mirror

Are any other features needed or desired?  If so what?  Any bugs or incorrect operation?   Any incorrect or confusing documentation?   Current documentation is a bit redundant.  I prefer not to write about the same things in multiple places because it is nearly impossible to keep everything upto date. Any ideas about how to clean this up?

Rui 'Trovatore' Pires

Do you feel that it is final and documented enough for general and public consumption? If so, let me know and with your blessing I'll upload it to my resource site.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Scorpiorus

#2
Nice work with the module! :)

I was just browsing the module script and noticed:
[line 548]: len = secptr-this.nextptr+1;
which AGS treats as "len = secptr-(this.nextptr+1);"
instead of "len = (secptr-this.nextptr)+1;"

RickJ

#3
Quote
I was just browsing the module script and noticed:
[line 548]: len = secptr-this.nextptr+1;
which AGS treats as "len = secptr-(this.nextptr+1);"
instead of "len = (secptr-this.nextptr)+1;"
Thanks a bunch. I'll look into it and get it fixed. 

Quote
Do you feel that it is final and documented enough for general and public consumption? If so, let me know and with your blessing I'll upload it to my resource site.
Rui, you're quite welcome to mirror it. I would say if someone has a need for it they could definitely start using it. As you can see from the original thread most of the issues are related to modules in general. Although, Scorp has identified a few things I overlooked. I think the Get functions need to be enhanced a bit so they can be used to dump a whole section or the whole buffer (i.e. if someone wanted to load a listbox with the contents of a section for example).

SSH

#4
The Inifile.txt document in the Inifile zip seems to go on about copying stuff into global script, etc. I guess this comes from before AGS module support was added and needs updating...

Thanks!
12

tiagocorreia

This module doesn't seems to work on the latest version of AGS 2.72.

I've disabled the enforce new string styles.

Do you think you can fix it, or it better for me to try to fix it?

Kweepa

RickJ hasn't posted in a month or so... I think you might be on your own.
Still waiting for Purity of the Surf II

SMF spam blocked by CleanTalk