SA-MP Forums Archive
[Help]Bussines - 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: [Help]Bussines (/showthread.php?tid=570458)



[Help]Bussines - Plamen18 - 10.04.2015

Hello ,i start to modify a GM and I found a bug business, If in the safe I have 0 and if I give removed and placed an amount as is " 123123123123 " puts money in the safe , every time a different amount. Sorry for my english.

Код:
	case DIALOG_MYBUSINESS_RET:
	{
	    new id = getPlayerBusinessID(playerid), money = strval(inputtext);
		if(response)
		{
		    if(isnull(inputtext)) return SendClientMessage(playerid, COLOR_GREY, "* No has ingresado nada.");
	        if (isnumeric(inputtext))
	        {
	            if(businessVariables[id][bVault] < money) return SendClientMessage(playerid, COLOR_GREY, "* No hay la cantidad de dinero que ingresaste.");
	 			Earn(playerid,money);
				businessVariables[id][bVault] -= money;
				format(szMessage, sizeof(szMessage), "* Retiraste: $%d - Dinero disponible: $%d",money,businessVariables[id][bVault]);
				SendClientMessageEx(playerid, -1, szMessage);
				SaveVarBusiness(1,id, "Vault",businessVariables[id][bVault]);
				SaveVarPlayer(1,playerid, "Money", GetPVarInt(playerid, "Cash") );
			}
			else return SendClientMessageEx(playerid, -1, "* Sуlo puedes ingresar nъmeros.");



Re: [Help]Bussines - Matess - 10.04.2015

2,147,483,647 is the maximum for 32-bit variable so 123,123,123,123 is not possible to insert like integer.


Re: [Help]Bussines - Plamen18 - 11.04.2015

Quote:
Originally Posted by Matess
Посмотреть сообщение
2,147,483,647 is the maximum for 32-bit variable so 123,123,123,123 is not possible to insert like integer.
Thank you, i found a mistake