Question regarding y_INI
#1

Hello,
I wanted to change my file system from Dini to y_INI but I am somehow not able to get some stuff working:

How to read strings from a file?

I tried "INI_String" but it told me that it is an undefined symbol, although I did include every needed file.

I just want to do it like with dini, example:

pawn Код:
if(strcmp(buf,dini_Get(file,"Password"),false) == 0)
. . .
How would I do that, or "dini_Int" with y_INI? I took a look at the example which is shown in the release topic but that kind of confused me.
Reply
#2

I had the same problem with INI_String, if you read the y_ini post again, you see allt he params.

pawn Код:
INI_String(filename, fileline, SIZE);
Reply
#3

INI_ReadString(dest[], const key[], maxlength = sizeof(dest))
Example:
pawn Код:
INI_ReadString(PlayerPassword,"Password", 30);

EDIT:Too late
Reply
#4

Quote:
Originally Posted by Delux13
Посмотреть сообщение
INI_ReadString(dest[], const key[], maxlength = sizeof(dest))
Example:
pawn Код:
INI_ReadString(PlayerPassword,"Password", 30);

EDIT:Too late
I dont think theres is a INI_ReadString, maybe this is from a older version, but i dont think this function is in the y_ini since its not in the y_ini topic.

Код:
INI_String
name[] - Name of the INI textual identifier.
variable - Variable to store to.
length - Length of the destination array.
Reply
#5

I am refering to the SII include.
Reply
#6

Ah well, but since hes using y_ini, i dont think he needs that
Reply
#7

No I don't use SII. But thanks for the help though.


But now I get this error:

Код:
error 017: undefined symbol "@INI_file_"
My code:

pawn Код:
new INI:file = INI_Open(playerfile);
   
    INI:file[](name[], value[])
    {
    INI_String("a", gA, len_of_gA);
    INI_String("b", gB, len_of_gB);
    INI_String("c", gC, len_of_gC);
    return 0; // This is now required.
    }

    INI_Load("myini.ini");
I still don't really get how that works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)