SA-MP Forums Archive
Im getting a tag mismatch with... - 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)
+--- Thread: Im getting a tag mismatch with... (/showthread.php?tid=353458)



Im getting a tag mismatch with... - chaosnz - 23.06.2012

the bits in bold..

Код:
forward Payday(playerid);
public Payday(playerid)
{
	for(new i=0; i <= MAX_PLAYERS; i++)
	{
		if ( IsPlayerConnected(i) )
		{
  			new oldmoney = GetPlayerMoney(i);
   			new string[48];
			SendClientMessage(i,0xFF9900AA,"--------PAYDAY---------");
			SendClientMessage(i,0xFF9900AA,"You have earned $3500");
			SendClientMessage(i,0xFF9900AA,"PREVIOUS BALANCE");
   			format(string, sizeof(string), "$%i",oldmoney);
   			SendClientMessage(playerid, 0xFFFFFFAA, string);
			GivePlayerMoney(i,3500);
   			new pay = GetPlayerMoney(i);
   			if (oldmoney > 10000)
			{
				new string2[48];
				new interestcal;
				new interestpay;
				interestcal = oldmoney * 5.9 / 100;
				interestpay = interestcal + oldmoney;
				SendClientMessage(i,0xFF9900AA,"You have received 5.9 percent in interest");
   				format(string2, sizeof(string2), "Interest:$%i",interestpay);
   				SendClientMessage(playerid, 0xFFFFFFAA, string2);
				GivePlayerMoney(i,interestpay);
			}
			new cash3 = GetPlayerMoney(i);
			new string3[48];
			SendClientMessage(i,0xFF9900AA,"NEW BALANCE");
   			format(string3, sizeof(string3), "$%i",cash3);
   			SendClientMessage(playerid, 0xFFFFFFAA, string3);
   			SendClientMessage(i,0xFF9900AA,"--------PAYDAY---------");
			new string4[48];
			new gstcal;
			new gstpay;
			gstcal = pay / 100 * 12.5;
			gstpay = gstcal - oldmoney;
			SendClientMessage(i,0xFF9900AA,"You have been taxed 12.5 percent");
   			format(string4, sizeof(string4), "GST: $%i",gstpay);
   			SendClientMessage(playerid, 0xFFFFFFAA, string4);
			GivePlayerMoney(i,-gstpay);
		}
	}
    return 1;
}
can anyone give me an idea as to why its doing that? i cant figure it out for the life of me..

+ REP to anyone who can help.


Re: Im getting a tag mismatch with... - SuperViper - 23.06.2012

pawn Код:
interestcal = floatround(oldmoney * 5.9 / 100);
pawn Код:
gstcal = floatround(pay / 100 * 12.5);