Whirlpool - Array no matching or too small error
#1

So, I'm using Y_INI and the Whirlpool plugin and keep getting this error: error 047: array sizes do not match, or destination array is too small.

It's on this line:
INI_String("Password",PlayerInfo[playerid][pPass],129);

And the variable is defined as pPass[129]. If I comment the INI_String line out, the script compiles fine. I've already tried making it bigger and it doesn't matter, it still gives the error.
Reply
#2

As per the wiki

Quote:

These are functions internal in the ini system and should not (and most can not) be called by the scripter.

INI_String(name[], function)
Deprecated.

What are you trying to achieve?
Reply
#3

I'm trying to load the player's password to make sure they entered the right one when logging in.
Reply
#4

pawn Код:
Player_LoadString("Password", PlayerInfo[playerid][pPass]);
Should work. I'm not 100% familiar with Y_INI but reading over a quick tutorial, I assume that's how it's done.
For comparing the strings just use good old strcmp.
Reply
#5

Quote:
Originally Posted by Shoulen
Посмотреть сообщение
As per the wiki



What are you trying to achieve?
It needs a third parameter and that's the lenght. Plus Player_LoadString does not exist, it's just a custom function. This is now how y_ini works, take a look at any tutorial.

DeLuca, I can't find any problem with your code if pPass has size of 129 into the enum, then it should be fine.
Reply
#6

Yeah, I've been searching for hours and I can't see what's wrong with mine. You must have the length included in the function, which I do. It just won't compile...
Reply
#7

Since it's related to y_ini, it's better to post it to its original thread. I'm sure there're more chances to get a solution by ****** or someone else there than here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)