27.01.2010, 12:03
I was trying to convert the login/register system to Dini, but im getting a few errors.
OnPlayerLogin:
Enum:
Errors:
OnPlayerLogin:
pawn Код:
public OnPlayerLogin(playerid, password[])
{
new tmp2[64];
new string2[256];
new playername2[MAX_PLAYER_NAME];
new playernamesplit[3][MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
split(playername2, playernamesplit, '_');
format(string2, sizeof(string2), "users/%s.ini", playername2);
if(dini_Exists(string2))
{
[ ... ]
PlayerInfo[playerid][pMarried] = dini_Int(string2, "Married");
PlayerInfo[playerid][pMarriedTo] = dini_Get(string2, "MarriedTo");
PlayerInfo[playerid][pNote1] = dini_Get(string2, "Note1");
PlayerInfo[playerid][pNote1s] = dini_Int(string2, "Note1s");
PlayerInfo[playerid][pNote2] = dini_Get(string2, "Note2");
PlayerInfo[playerid][pNote2s] = dini_Int(string2, "Note2s");
PlayerInfo[playerid][pNote3] = dini_Get(string2, "Note3");
PlayerInfo[playerid][pNote3s] = dini_Int(string2, "Note3s");
PlayerInfo[playerid][pNote4] = dini_Get(string2, "Note4");
PlayerInfo[playerid][pNote4s] = dini_Int(string2, "Note4s");
PlayerInfo[playerid][pNote5] = dini_Get(string2, "Note5");
PlayerInfo[playerid][pNote5s] = dini_Int(string2, "Note5s");
[ ... ]
}
[ ... ]
pawn Код:
enum pInfo
{
[ ... ]
pMarried,
pMarriedTo[128],
pNote1[128],
pNote1s,
pNote2[128],
pNote2s,
pNote3[128],
pNote3s,
pNote4[128],
pNote4s,
pNote5[128],
pNote5s,
[ ... ]
};
Код:
C:\Documents and Settings\Administrator\Desktop\ \gamemodes\BBC1.pwn(10766) : error 047: array sizes do not match, or destination array is too small C:\Documents and Settings\Administrator\Desktop\ \gamemodes\BBC1.pwn(10767) : error 047: array sizes do not match, or destination array is too small C:\Documents and Settings\Administrator\Desktop\ \gamemodes\BBC1.pwn(10769) : error 047: array sizes do not match, or destination array is too small C:\Documents and Settings\Administrator\Desktop\ \gamemodes\BBC1.pwn(10771) : error 047: array sizes do not match, or destination array is too small C:\Documents and Settings\Administrator\Desktop\ \gamemodes\BBC1.pwn(10773) : error 047: array sizes do not match, or destination array is too small C:\Documents and Settings\Administrator\Desktop\ \gamemodes\BBC1.pwn(10775) : error 047: array sizes do not match, or destination array is too small Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.