30.05.2013, 18:11
Hi, I am adjusting my saving system so it also saves my position.
But I am getting this error:
I tried actually everything, but it doesn't seem to work.
Code:
Rest of the code:
Everything else works fine, help would be appreciated.
But I am getting this error:
pawn Code:
error 001: expected token: ",", but found ";"
Code:
pawn Code:
SetPlayerPos(playerid, dini_Int(file, "Position")-GetPlayerPos(playerid, x, y, z); // Error line.
pawn Code:
if (dialogid == 2)
{
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(!response) return Kick(playerid);
if (!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login Dialog", "You are already registered.\nPlease insert your password.", "Login", "Leave");
new tmp;
tmp = dini_Int(file, "Password");
if(udb_hash(inputtext) != tmp) {
SendClientMessage(playerid, COLOR_RED, "Wrong password, try again!");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login Dialog", "Welcome!\nPlease insert your password", "Login", "Exit");
}
else
{
gPlayerLogged[playerid] = 1;
PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
GivePlayerMoney(playerid, dini_Int(file, "Money")-GetPlayerMoney(playerid));
SetPlayerPos(playerid, dini_Int(file, "Position")-GetPlayerPos(playerid, x, y, z);
SendClientMessage(playerid, COLOR_YELLOW, "You have succesfully logged in!");
}
}