SA-MP Forums Archive
Changing values in a .ini file? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Changing values in a .ini file? (/showthread.php?tid=157358)



Changing values in a .ini file? - Whizion - 06.07.2010

So i have .ini files for user files and they go like this:

Something=0
SomethingElse=0
SomethingNew=0
SomethingOld=0

And i want to change a value of let's say SomethingElse, how would i do that?

I tryed doing it myself but it deletes all the other info and just writes the one i choosed to edit.

Help me, thanks.


Re: Changing values in a .ini file? - [HiC]TheKiller - 06.07.2010

Use Dini or DUDB. It is much easier .


Re: Changing values in a .ini file? - Miikkel - 06.07.2010

I will suggest Dini as it's a good, easy and an awesome include. I use it my self.


Re: Changing values in a .ini file? - Whizion - 06.07.2010

Thanks for the suggestions but im kinda stuck with this and changing to dini would require a lot of time. So i really need to figure out how to do this with this .ini files. (it's the saving system i took out from Godfather RP).


Re: Changing values in a .ini file? - DJBluefader - 06.07.2010

dudB is very useful for userfiles, dINI for some other stuff. Don't use fwrite, fclose, etc..., it's to hard!


Re: Changing values in a .ini file? - TheKingOfSamp - 06.07.2010

Dini is very very easy , use it


Re: Changing values in a .ini file? - Whizion - 06.07.2010

Uhm, okay.. So could anyone explain how could i do this with dini or dudB?


Re: Changing values in a .ini file? - Whizion - 06.07.2010

First you suggest it, and now you don't answer. lol


Re: Changing values in a .ini file? - iJumbo - 06.07.2010

u mean this ??

1 = dini_Get("some.ini", "Something");
2 = dini_Get("some.ini", "Something");
3 = dini_Get("some.ini", "Something");
if Something 1 bla bla bla else if Something 0 bla bla bla

??


Re: Changing values in a .ini file? - [LDT]LuxurY - 06.07.2010

I recommend DJson (extended version of dini)
it's here: https://sampforum.blast.hk/showthread.php?tid=48439