The Daily Click ::. Forums ::. Klik Coding Help ::. INI object- can't add variables taken from INI
 

Post Reply  Post Oekaki 
 

Posted By Message

KlikFactory



Registered
  11/01/2002
Points
  692
12th May, 2004 at 20:40:21 -

Okay, let's say I want to set a variable or a counter to be a combination of values drawn from an INI. Example:

value at( "megapower.ini", "accessories", "atkmod" ) + value at( "megapower.ini", "helmet", "atkmod" ) + value at( "megapower.ini", "armor", "atkmod" ) + value at( "megapower.ini", "weapon1", "atkmod" ) + value at( "megapower.ini", "weapon2", "atkmod" )

Now i don't expect you to know what any of that means specifically, just see that it's adding INI variables.

The problem is that when I do this, it doesn't seem to take all the numbers into account. If I set a counter to these values combined, it will only find the first value, and not look for any of the other ones.

I don't have any problem having a counter that is set to each variable, then adding the counter values. The thing is, I would need dozens of counters if I made one for each INI value, which would be way too much extra work.

Anyone figure out some special way of adding INI values that I don't know about? Or is there some method I'm missing? I don't expect to get an answer, I'm just throwing this out there.

 
Why's there a star next to the Sig? What if I don't want a sig? This sucks.

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
13th May, 2004 at 02:04:19 -

That code seems like it should work. Do you have the actual code? Because it's a bit hard to tell what the problem is otherwise.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
13th May, 2004 at 12:01:10 -

yea good point Phizz Ini plus works marvels. hell if you have MMF you might as well get the save game object

but one thing i do is use the INI for loading in values at the start of a game, either into Global Values or the 1000 GV object. its much easier like that i think

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Kramy



Registered
  08/06/2002
Points
  1888
13th May, 2004 at 14:03:01 -

Not a clue. You might try this though.

Set to(value at( "megapower.ini", "accessories", "atkmod" ))
Add (value at( "megapower.ini", "helmet", "atkmod" ))
Add (value at( "megapower.ini", "armor", "atkmod" ))
Add (value at( "megapower.ini", "weapon1", "atkmod" ))
Add (value at( "megapower.ini", "weapon2", "atkmod" ))

 
Kramy

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
13th May, 2004 at 14:07:29 -

I found the same thing when I tried to add values from an INI directly. The solution I used was to create a lot of temporary counters and put them in that - crude, but it worked.

 
http://www.davidn.co.nr - Games, music, living in America

KlikFactory



Registered
  11/01/2002
Points
  692
13th May, 2004 at 19:41:01 -

It is INI Plus, and Wongbong knows what I'm talking about.

I can't create counters 'cause I would need dozens and dozens and dozens of them, and that doesn't sound like a good idea.

I figured out another way to do what I want to do, though it's not as perfect. I'll manage. Thanks anyways guys

 
Why's there a star next to the Sig? What if I don't want a sig? This sucks.
   

Post Reply



 



Advertisement

Worth A Click