Got no clue what so ever.. -
Basically I'm trying to save certain stuff and I haven't had any bugs what so ever when I started scripting ways of saving. However, now I do have a problem and I can't find it?;O
And I know with certainty it is this snippet, I am completely certain.
The problem is that the whole server fucks up and I get some parameter warnings saying; sscanf warning: Format specifier does not match parameter count.
Code:
if (dialogid == 3)
{
new name[MAX_PLAYER_NAME], path[256];
GetPlayerName(playerid, name, sizeof(name));
format(path, sizeof(path), "Accounts/%s.ini", name);
if(!response) return Kick(playerid);
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 3, DIALOG_STYLE_INPUT, "Welcome back to Whatever", "Please enter your password for authorization", "Continue", "Quit");
new password[64];
new file = ini_openFile(path);
ini_getString(file, "Password", password);
if(sscanf(password, inputtext) != 0)
{
SendClientMessage(playerid, COLOR_RED, "You have entered the wrong password");
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_INPUT, "Welcome back to Whatever", "Please enter your password for authorization", "Continue", "Quit");
}
else
{
gPlayerLogged[playerid] = 1;
ini_getInteger(file, "Score", PlayerInfo[playerid][pScore]);
ini_getInteger(file, "AdminLevel", PlayerInfo[playerid][pAdmin]);
ini_getInteger(file, "Skin", PlayerInfo[playerid][pSkin]);
ini_getInteger(file, "Male", PlayerInfo[playerid][pMale]);
ini_getInteger(file, "Race", gTeam[playerid]);
ini_getInteger(file, "aJailed", PlayerInfo[playerid][pJailed]);
ini_getInteger(file, "Paycheck", PlayerInfo[playerid][pPayCheck]);
ini_getInteger(file, "AdminDuty", PlayerInfo[playerid][AdminDuty]);
ini_getInteger(file, "CantFish", PlayerInfo[playerid][CantFish]);
ini_getInteger(file, "LastSkin", PlayerInfo[playerid][LastSkin]);
ini_getInteger(file, "FishesCollected", PlayerInfo[playerid][FishesCollected]);
ini_getInteger(file, "JailTime", PlayerInfo[playerid][pJailTime]);
ini_getInteger(file, "Female", PlayerInfo[playerid][pFemale]);
ini_getInteger(file, "UpgradePoints", PlayerInfo[playerid][pUpgrade]);
SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
new Float:hp;
ini_getFloat(file, "Health", hp);
SetPlayerHealth(playerid, hp);
ini_getInteger(file, "Experience points", PlayerInfo[playerid][pExp]);
ini_getInteger(file, "Money", PlayerInfo[playerid][pMoney]);
GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
SendClientMessage(playerid,COLOR_RED, "[SYSTEM] Successfully logged in");
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][LastSkin], SpawnX, SpawnY, SpawnZ, 90, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
ini_closeFile(file);
}
return 1;
Re: Got no clue what so ever.. -
Re: Got no clue what so ever.. -
I replaced that but still it refuses to work I get the error; Strings without a length are deprecated , please add a destination size.