SA-MP Forums Archive
why dosnt this work? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: why dosnt this work? (/showthread.php?tid=184746)



why dosnt this work? - dark_clown - 21.10.2010

this dosnt work
just appears this

why
Код:
 if(dini_Exists(file))
	    {
	        if(strcmp(params,dini_Get(file,"Password"),false) != 0)
			{
                PInfo[playerid][failedlogin]++;
                format(string, sizeof string, "Wrong password!(failed: %s times)",PInfo[playerid][failedlogin]);
				SendClientMessage(playerid,red,string);
			}
			else if(PInfo[playerid][failedlogin] > 3)
			{
				format(string, sizeof string, "%s(%i) has been kicked for failed logins (%s)",n,playerid,PInfo[playerid][failedlogin]);
				SendClientMessageToAll(red, string);
				Kick(playerid);
			}
			else
			{
			    dini_IntSet(file,"Logged",1);
			    PInfo[playerid][Logged] = 1;
			    PInfo[playerid][Level] = dini_Int(file,"Level");
			    PInfo[playerid][Muted] = dini_Int(file,"Muted");
                PInfo[playerid][Jailed] = dini_Int(file,"Jailed");
                PInfo[playerid][Frozen] = dini_Int(file,"Frozen");
                SetPlayerScore(playerid,dini_Int(file,"Score"));
                GivePlayerMoney(playerid, dini_Int(file, "Money"));
  			    SendClientMessage(playerid,YELLOW,"You have now logged in!");
			    return 1;
			}



Re: why dosnt this work? - smeti - 21.10.2010

pawn Код:
format(string, sizeof string, "Wrong password!(failed: %s times)",PInfo[playerid][failedlogin]);
pawn Код:
PInfo[playerid][failedlogin] // integer use %d or %i
try
pawn Код:
"Wrong password!(failed: %d times)"