Changing values in a .ini file?
#1

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.
Reply
#2

Use Dini or DUDB. It is much easier .
Reply
#3

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

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).
Reply
#5

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

Dini is very very easy , use it
Reply
#7

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

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

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

??
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)