SA-MP Forums Archive
Problem with saving and retrieving money - 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: Problem with saving and retrieving money (/showthread.php?tid=579607)



Problem with saving and retrieving money - Sc0pion - 28.06.2015

Fixed!


Re: Problem with saving and retrieving money - Kwarde - 28.06.2015

First of all, why are you using are you using 256 cells for your formats? The max length for client messages is 128.. you are wasting memory. The best thing you can do is count the characters (every character, including spaces) and make that the max array size.

Now, in this cancelhit command, you are changing the value of 'HasHit[*]' to 0 (zero). What is your difference between ID and contract_id? Because those seem to be the same (no idea why you suddenly created contract_id - Also you should not make a global variable just to use/change them in sscanf). So it does work, you set this money to 0 and then give 0 to whoever used this /cancelhit.