[Help]Bussines
#1

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.");
Reply
#2

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)