The Daily Click ::. Forums ::. Klik Coding Help ::. What am I doing wrong; INI doesn't work
 

Post Reply  Post Oekaki 
 

Posted By Message

:JULI@N:



Registered
  14/07/2002
Points
  641
5th July, 2004 at 00:12:44 -

Image
The counter is still at zero! And supposedly it should be 99

 
n/a

Kramy



Registered
  08/06/2002
Points
  1888
5th July, 2004 at 00:25:32 -

Have you tried setting a group in the ini?

 
Kramy

:JULI@N:



Registered
  14/07/2002
Points
  641
5th July, 2004 at 00:37:35 -

No, ill do it

 
n/a

:JULI@N:



Registered
  14/07/2002
Points
  641
5th July, 2004 at 00:40:19 -

Nope, it still doesn't work

 
n/a

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
5th July, 2004 at 04:27:19 -

Try setting a group and pulling the items from that group as well.

Though if you just need one group, you might be better off using AssArray.

 
gone fishin'

Tiles

Possibly Insane

Registered
  06/12/2002
Points
  2339

GOTM 3TH PLACE WINNER - JANUARY 2010
5th July, 2004 at 10:31:19 -

the order of the events and actions is veeery important when working with ini.

First you have to define the ini. then the group, then the item. and finally the shown action with set counter to ini ...

set ini to $appdrive+$appdir+"myini.ini"
set current group to "mygroup"
set current item to "myitem1"

set counter to value of ini

it doesn´t want to work when there is one thing in the wrong order . for example when you first set the counter to the ini before you have loaded the ini to read from

take a look in the events list editor ... veeery important this

 
Free graphics,Free Games
http://www.reinerstilesets.de

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
5th July, 2004 at 11:38:05 -

For some people, like me, Ini's only work after you actually compile the program. It's an odd little glitch, but I know I'm not the only one who has had this problem.

 
Craps, I'm an old man!

tdc052621



Registered
  20/12/2002
Points
  908
5th July, 2004 at 13:55:28 -

Man, ini is easy to use, im using it for my next game to save where you left off if you quit.Im also using ini alot in a test rpg game.

Actually ini is very useful for rpgs.

Image Edited by the Author.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
5th July, 2004 at 15:28:31 -

speaking of rpgs ive had a few problems using ini to load properly

i have to put every single action in a different line

start of level ini group to "stats"
set item to "hp"
set counter to value of ini

i can't set the item and load the value at the same time too often or the number will be mixed up

 
.

Noyb



Registered
  31/05/2004
Points
  1117

VIP Member
5th July, 2004 at 15:34:20 -

Since there isn't "wx" or "ec" in the INI, are you sure it's pointing to the right file? Try to set the qz value in-game to debug.

 
"Omg. Where did they get the idea to not use army guys? Are they taking drugs?" --Tim Schafer on originality in videogames

:JULI@N:



Registered
  14/07/2002
Points
  641
5th July, 2004 at 15:49:43 -

Also, it just doesn't work when I get a "value from an item", if I just use "get value", it works.

I have also tried saving it as a stand alone application, like shab said, but it still doesn't work

Image Edited by the Author.

 
n/a

defenestrator

Old

Registered
  12/07/2003
Points
  724
5th July, 2004 at 17:17:02 -

At the start of the frame, you might want to set the file before doing anything else.

 
n/a

:JULI@N:



Registered
  14/07/2002
Points
  641
5th July, 2004 at 17:21:59 -

Yeah at the start of frame the file is set. And I even tried by loading all the stuff from the INI until the timer is 00'10. But it doesn't work.

 
n/a

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
5th July, 2004 at 17:24:39 -

Are you doing it step by step in different events?
like
Event - Load Value qz
Event - Load Value dz
this might help like andy suggested.

 
Craps, I'm an old man!

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
5th July, 2004 at 17:34:40 -

No phizzy, the Ini+ DOES work. At least with the proper updates anyway, mine's worked fine off the CD.

 
Craps, I'm an old man!

:JULI@N:



Registered
  14/07/2002
Points
  641
5th July, 2004 at 17:47:34 -

I'm using the ini plus that comes with MMF (there is one right? maybe I did install the ini+ i had for TGF...), and, um doing it step by step well, that's what i may end up doing. But for that i'd have to put
timer equals to 00'01 - stuff
timer equals to 00'02 - stuff
timer equals to 00'03 - stuff
timer equals to 00'04 - stuff
timer equals to 00'05 - stuff
timer equals to 00'06 - stuff
...etc
wouldn't I? There are 8 weapons to load

 
n/a

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
5th July, 2004 at 17:55:12 -

You're better off using loop based loading
ex.
=================================
always And Counter is <10 - add 1 to counter
counter=1 - load this
counter=2 - load that
and so on.
This is only because sometimes timed events get skipped on slower systems or in large games.


 
Craps, I'm an old man!

Pete Nattress

Cheesy Bits img src/uploads/sccheesegif

Registered
  23/09/2002
Points
  4811
5th July, 2004 at 17:55:36 -

phizzy's right, the standard INI object should be favoured over INI+. INI+ for MMF is provided for people who have used it in TGF games and want compatibility. http://www.clickteam.info/extensions/extview.php?id=80

i'm pretty sure you could have all those actions in one event, one after the other. or run a fastloop to do it.

 
www.thenatflap.co.uk

:JULI@N:



Registered
  14/07/2002
Points
  641
5th July, 2004 at 17:59:17 -

Ok. I'll do the loop thing. Thank you very much

 
n/a

:JULI@N:



Registered
  14/07/2002
Points
  641
5th July, 2004 at 18:22:04 -

Oh.... silly me....
I picked the normal INI (not plus) from the "Insert new object" dialog...
It can get values from items.....
...
....
So the problem was that I chose INI plus the first time....
It works perfectly now and as I wanted (loading the 8 weapons at start of frame)

 
n/a

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
5th July, 2004 at 18:29:25 -

just a question, what is it that you're working on there?

 
Craps, I'm an old man!

:JULI@N:



Registered
  14/07/2002
Points
  641
5th July, 2004 at 18:36:13 -

Um its a weird game, I think I'll name it "Bizarrity" there are 8 (wacky) weapons (like carrots), and each has it's own type of bullet, so that's why many things have to be loaded at the start of frame. I'll make a preview or submit a demo soon

 
n/a
   

Post Reply



 



Advertisement

Worth A Click