SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 20/11/2011, 08:26 PM   #1
Andregood
Huge Clucker
 
Andregood's Avatar
 
Join Date: Oct 2009
Location: Sweden
Posts: 285
Reputation: 26
Default 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.

If anybody can see anything wrong in there, tell me please :/


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;
Andregood is offline   Reply With Quote
Old 20/11/2011, 09:33 PM   #2
Psymetrix
Huge Clucker
 
Join Date: Oct 2011
Posts: 292
Reputation: 104
Default Re: Got no clue what so ever..

pawn Code:
if(sscanf(password, "s", inputtext))
?
Psymetrix is offline   Reply With Quote
Old 21/11/2011, 02:47 PM   #3
Andregood
Huge Clucker
 
Andregood's Avatar
 
Join Date: Oct 2009
Location: Sweden
Posts: 285
Reputation: 26
Default Re: Got no clue what so ever..

Quote:
Originally Posted by Psymetrix View Post
pawn Code:
if(sscanf(password, "s", inputtext))
?
I replaced that but still it refuses to work I get the error; Strings without a length are deprecated , please add a destination size.
Andregood is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does anyone has clue why its NOT working? Ben7544 Help Archive 3 25/07/2011 01:57 AM
I got a domain and got no clue how to set it up Haxarr Everything and Nothing 7 23/04/2011 11:12 PM
How to script a script??? how do u scripted a script, i have no clue HELP! Badandy Help Archive 10 06/06/2009 07:57 PM


All times are GMT. The time now is 10:20 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.