SA-MP Forums Archive
Getting a value with dini returns 0 - 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: Getting a value with dini returns 0 (/showthread.php?tid=203711)



Getting a value with dini returns 0 - Jochemd - 27.12.2010

Hello,

I got a weird problem

pawn Код:
format(string,sizeof(string),"      Bank Cash: $%d - 5 Percent Profit = $%d - New Balance: $%d.",dini_Int(file,"BankMoney"),BankProfit,dini_Int(file,"BankMoney") + BankProfit);
        SendClientMessage(playerid,COLOR_ORANGE,string);
returns 0. 'file' is formatted good. The problem is in the first %d (Bank Cash: $%d). That one just gives 0 although I got 200000 in my bank.

Regards, Jochem


Re: Getting a value with dini returns 0 - Jefff - 27.12.2010

Why 2x didi_Int ? ;/
Try:
pawn Код:
new BankM = dini_Int(file,"BankMoney");
format(string,sizeof(string),"      Bank Cash: $%d - 5 Percent Profit = $%d - New Balance: $%d.",BankM,BankProfit,(BankM + BankProfit));



Re: Getting a value with dini returns 0 - Jochemd - 28.12.2010

Yea I've tried it yesterday evening and it worked