#1

Hello, I started to learn how to use y_ini because it's reliable, also faster and newest than Dini.
****** wrote:
Quote:
Originally Posted by ******
Посмотреть сообщение
Use

To use this simply include the header:

pawn Код:
#include <YSI\y_ini>
If you want to save whirlpool hashes with this system, due to an oversight on my part you need to increase the max buffer size:

pawn Код:
#define MAX_INI_LINE 160
#include <YSI\y_ini>
Everytime, I add it on the FS, I get a warning
pawn Код:
warning 201: redefinition of constant/macro (symbol "MAX_INI_LINE")
What is this, and how I can fix it?

Regards,
Reply
#2

You do have the MAX_INI_LINE define before the y_Ini include right? Otherwise, remove the MAX_INI_LINE in the y_ini file
Reply
#3

Try:
pawn Код:
#include <YSI\y_ini>
#undef MAX_INI_LINE
#define MAX_INI_LINE 160
Reply
#4

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
You do have the MAX_INI_LINE define before the y_Ini include right? Otherwise, remove the MAX_INI_LINE in the y_ini file
I had added before the include, but it still gave me that warning.
Quote:
Originally Posted by Stigg
Посмотреть сообщение
Try:
pawn Код:
#include <YSI\y_ini>
#undef MAX_INI_LINE
#define MAX_INI_LINE 160
With this under the includes, it compiles fine.

Thank you both for reply!
Reply
#5

As far as i know, it checks in the include if its already defined, and if its defined it just undefines the MAX_INI_LINE. Practicly you just do the same right now in the file
Reply
#6

In the file, it has only this.
pawn Код:
#define MAX_INI_LINE                    (MAX_INI_ENTRY_NAME + MAX_INI_ENTRY_TEXT + 32)
32 + YSI_MAX_STRING + 32
Reply
#7

Isnt there something like

pawn Код:
#if !defined MAX_INI_LINE
#define MAX_INI_LINE blabla
#endif
Reply
#8

In the YSI folder > y_ini.inc
There isn't any text with this. Only the text I posted above.
Reply
#9

Hmkay, bad ******
Reply
#10

Quote:
Originally Posted by ******
Посмотреть сообщение
My bad, you should set "MAX_INI_ENTRY_TEXT", not "MAX_INI_LINE". And you should always do it BEFORE the include, otherwise it makes no difference. The latest version already uses 130 correctly though I believe, but it depends on if you have that version or not (though that change was a while ago now).
pawn Код:
#include <a_samp>
#define MAX_INI_ENTRY_TEXT 160
#include <YSI\y_ini>
It compiles now. Thank you very much ******!
I am using the latest version. So I have to change it to 160 or delete it and let it to 130, as you said that it uses.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)