Dini я symbol -
Kraeror - 25.05.2017
Hello all. I created save system with dini for my house system. The house owner is saved successfully, but when it load the owner, appear the symbol " я ". Here is my code to save:
dini_Set(biz, "Owner", HouseInfo[houseid][hOwner]);
Here is my code for loading:
format(HouseInfo[houseid][hOwner], MAX_PLAYER_NAME, dini_Get(housestring, "Owner"));
BTW I'm using the last version of Dini (1.6).
And this is a very big problem because when the server is looking for the owner, it does not find it.
Re: Dini я symbol -
Cadilab - 25.05.2017
Well I don't think dini supports non-english chars, you should switch or write your code in english.
Re: Dini я symbol -
Kraeror - 25.05.2017
Quote:
Originally Posted by Cadilab
Well I don't think dini supports non-english chars, you should switch or write your code in english.
|
It's in english.
Re: Dini я symbol -
NaS - 25.05.2017
Quote:
Originally Posted by Cadilab
Well I don't think dini supports non-english chars, you should switch or write your code in english.
|
I don't think that is the point here - he probably meant that after reading a Username, the only output is that symbol.
Random signs usually come up when writing or reading strings the wrong way. Or when trying to format a number into a string (eg when using %s in format, but passing a number/character).
I guess other values get read correctly the same way?
Because that code as such seems correct (maybe a bit inefficient to use format there). The only question I have is if "housestring" really contains the filename, or is it a buffer for something else?
Re: Dini я symbol -
Vince - 25.05.2017
Quote:
Originally Posted by Kraeror
BTW I'm using the last version of Dini (1.6).
|
From 2008! Seriously, there are far, far better methods available nowadays. Start using them.
Re: Dini я symbol -
Kraeror - 25.05.2017
Quote:
Originally Posted by Vince
From 2008! Seriously, there are far, far better methods available nowadays. Start using them.
|
I know only how it works.

Can you give me
the latest and the best method you think?
Re: Dini я symbol -
Kraeror - 25.05.2017
Quote:
Originally Posted by NaS
I don't think that is the point here - he probably meant that after reading a Username, the only output is that symbol.
Random signs usually come up when writing or reading strings the wrong way. Or when trying to format a number into a string (eg when using %s in format, but passing a number/character).
I guess other values get read correctly the same way?
Because that code as such seems correct (maybe a bit inefficient to use format there). The only question I have is if "housestring" really contains the filename, or is it a buffer for something else?
|
Yes here is a housestring filename:
Quote:
new housestring[64];
format(housestring, sizeof(housestring), "/Houses/%d.dini.save", houseid);
if(dini_Exists(housestring))
{
//...
}
|
Re: Dini я symbol -
Cadilab - 25.05.2017
I didn't understand the question at first, but also I can't give you the proper answer due the lack of code.
Usually this happens when you try to pass uni chars into an ascii write operation, in ascii я is usually at the end.
I mean you can try and fix this, when writing a file, add \n at the first insert line, it should fix it, but my suggestion would be, if you wish to stay with files, to migrate to y_ini or eventually mysql, dini was released back in 2006 that was like 11 years ago, I didn't think people still use it.
Re: Dini я symbol -
Kraeror - 25.05.2017
Quote:
Originally Posted by Cadilab
I didn't understand the question at first, but also I can't give you the proper answer due the lack of code.
Usually this happens when you try to pass uni chars into an ascii write operation, in ascii я is usually at the end.
I mean you can try and fix this, when writing a file, add \n at the first insert line, it should fix it, but my suggestion would be, if you wish to stay with files, to migrate to y_ini or eventually mysql, dini was released back in 2006 that was like 11 years ago, I didn't think people still use it.
|
Where can I add \n. I didn't understand you. Can you give me a code?
Re: Dini я symbol -
Cadilab - 25.05.2017
I can't give you no code when you didn't provide it for us.
Can you please go to Scriptfiles/Houses/ and open one ini file and paste it here just so I can see what you have written in it.