SA-MP Forums Archive
bank - 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: bank (/showthread.php?tid=225831)



bank - omer5198 - 14.02.2011

i made a bank and when i deposit something on the file it deposit it X2 any idea why?
pawn Code:
dini_IntSet(file, "Bank Money",PlayerInfo[playerid][BankMoney] += money);



Re: bank - _Tommy - 14.02.2011

Split your line. The first would be reading the needed deposit value,
pawn Code:
new cash = PlayerInfo[playerid][BankMoney] += money)
And the second one would be the dini save,
pawn Code:
dini_IntSet(file, "Bank Money",cash);
I'm not sure, but it might be something that you haven't shown us. For example, maybe a bad code while getting the money variable?

BTW, I suggest using Y_ini instead of the old dini, this is much faster.