Whirlpool - Array no matching or too small error -
DeLuca - 09.10.2013
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.
Re: Whirlpool - Array no matching or too small error -
Shoulen - 09.10.2013
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?
Re: Whirlpool - Array no matching or too small error -
DeLuca - 09.10.2013
I'm trying to load the player's password to make sure they entered the right one when logging in.
Re: Whirlpool - Array no matching or too small error -
Shoulen - 09.10.2013
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.
Re: Whirlpool - Array no matching or too small error -
Konstantinos - 09.10.2013
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.
Re: Whirlpool - Array no matching or too small error -
DeLuca - 09.10.2013
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...
Re: Whirlpool - Array no matching or too small error -
Konstantinos - 09.10.2013
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.