50p Posted September 25, 2009 Author Share Posted September 25, 2009 Thats not exactly what i am looking for. I meant the code for the locations, or a data with many codes in it.Then i want to know how i can save money to the bank. THX Playsi I don't know what you're talking about. Sorry to break in your discussions.50p, i found a Bug: This happens with MTA 1.0, using the latest Bank version for 1.0 and also my self-patched version. as you may still know, Most player have a lot of money on our Server - and this resource already had some problems with this (99999999 max bug). So, since 1.0 there is a new Bug: Player with a lot of money (one of them had 139282797445 $) are getting minus balance! I had that Bug too. I logged in and found "-1447184811" on my Bank account. It seems that the money are only wrong displayed, it where still correctly in the sqllite database. I tried to fix this, but can't find the Problem... I know, you are busy with your nice Script Editor, but can you take a look at this? Thanks, XetaQuake Can you tell me how to reproduce the negative money bug? I have never had that problem. Link to comment
XetaQuake Posted September 25, 2009 Share Posted September 25, 2009 Hm, you can try to set your balance to 139282797445 and login. You can also try to logout then, reconnect and login again - that should show the bug. Alternatively, i can start my testserver for you and i create an account with an high count of money. Link to comment
Gamesnert Posted September 25, 2009 Share Posted September 25, 2009 you can try to set your balance to 139282797445 and login Does GTA, MTA and not even to mention SQL even support a 12 digit number? I know from C++, that if you have a signed number with only 1 byte (dunno if actually possible, never came beyond "Hello world!") and you'd reach its limit (127) it'd go from the lowest number possible (-128) on again if you increment. At least, if I remember correctly... Link to comment
XetaQuake Posted September 25, 2009 Share Posted September 25, 2009 That would explain a lot, thanks Gamesnert! Can someone else test this with the Bank resource? Anyway, curious that this Problem doesn't appeared with MTA dp2.3 Link to comment
Playsinator Posted September 25, 2009 Share Posted September 25, 2009 Thats not exactly what i am looking for. I meant the code for the locations, or a data with many codes in it.Then i want to know how i can save money to the bank. THX Playsi I don't know what you're talking about. Well, i mean the X, Y and Z-Coordinates of the entry etc. The coordinates of the banks. And then i yust want the code to save the money to the bank. Thanks Playsi Link to comment
50p Posted September 25, 2009 Author Share Posted September 25, 2009 Thats not exactly what i am looking for. I meant the code for the locations, or a data with many codes in it.Then i want to know how i can save money to the bank. THX Playsi I don't know what you're talking about. Well, i mean the X, Y and Z-Coordinates of the entry etc. The coordinates of the banks. And then i yust want the code to save the money to the bank. Thanks Playsi You've got the code... you can find it yourself... Didn't you read README.txt? Hm, you can try to set your balance to 139282797445 and login. You can also try to logout then, reconnect and login again - that should show the bug. Alternatively, i can start my testserver for you and i create an account with an high count of money. I'll try this. Link to comment
XetaQuake Posted September 29, 2009 Share Posted September 29, 2009 I'll try this. Any news? Link to comment
50p Posted September 29, 2009 Author Share Posted September 29, 2009 I'll try this. Any news? Yes. I changed from SQLite DB, back to accounts system since they work in 1.0. I just want to run it for some time and see if people still get problems with it. It should be out this weekend. Link to comment
XetaQuake Posted September 30, 2009 Share Posted September 30, 2009 Sounds great! Can you tell me, what the reason for this problem was? Link to comment
50p Posted September 30, 2009 Author Share Posted September 30, 2009 Negative money was caused by giving player too much money. For instance, try to give yourself 1000000000 and you'll get -99999999. Also as Gamesnert said, the max INT in SQLite is 2,147,483,647. I didn't want to limit people with that amount. There were a few ways to fix it: - make a limit of how much money users can save (that is not a good idea) - remake a bank table in registry.db with balance column of type TEXT (which in SQLite can store up to 2GB of text, that's 2 billion of characters) - remake a bank table in registry.db with balance column of type BIGINT (which in SQLite can store number up to 9,223,372,036,854,775,807) - move all bank accounts to accounts.xml I think the last one was the most suitable and easier for other resources to get users bank balance. Simply: getAccountData( getPlayerAccount( "username" ), "bank.balance" ); -- of course that's after checking if player's account is not quest account Link to comment
XetaQuake Posted September 30, 2009 Share Posted September 30, 2009 I'm glad I could help. Can you add an simple Converter inside a extra scriptfile to convert the SQLLITE version to the accountsdata? I still have the proper balances of all (~10.000) Accounts from dp2.3 times (inside the database.) Link to comment
50p Posted September 30, 2009 Author Share Posted September 30, 2009 OK, I've uploaded new version (2.2) which should work like a charm now. Get it here and read the "IMPORTANT!!!" description!: https://community.multitheftauto.com/index.html?p ... ails&id=54 Link to comment
XetaQuake Posted September 30, 2009 Share Posted September 30, 2009 Nice Update! But it seems to not work perfect. I have a Bankaccount with a balance of 6579258271 inside the database, and after transferring the accounts using /transferaccounts, the account have: <number_data bank.balance="-2010676321" /> Another account with an balance of 1426701349 was transferred correctly. Note: there a some no-more existing accounts inside the database, but i think that's not the reason for this "transfer bug". Then i want to know how i can save money to the bank.Hmm, possible i know why Playsinator had this question: If i seen correctly, there is no marker inside the Bank-interior?! Link to comment
50p Posted October 1, 2009 Author Share Posted October 1, 2009 Nice Update!But it seems to not work perfect. I have a Bankaccount with a balance of 6579258271 inside the database, and after transferring the accounts using /transferaccounts, the account have: <number_data bank.balance="-2010676321" /> Another account with an balance of 1426701349 was transferred correctly. Note: there a some no-more existing accounts inside the database, but i think that's not the reason for this "transfer bug". It's been said once. Your $6billion is greater than $2147483647. Querying such table gives unexpected results. 1426701349 is less than 2147483647, so it shouldn't be a problem. Then i want to know how i can save money to the bank.Hmm, possible i know why Playsinator had this question: If i seen correctly, there is no marker inside the Bank-interior?! Hmm, weird thing... I'll need to debug it even more. I've always used ATM (outside, interior 0) and it worked fine, so please use it until the in-existent banks bug is fixed. Link to comment
XetaQuake Posted October 1, 2009 Share Posted October 1, 2009 But it seems that my GPS: Anti-Abuse script works correct with the Serials inside the database - that's much more numbers then 6579258271. Yeah, these tables are BLOBs, but is this the only way to work with high numbers? Whats about the IPs inside the banlist.xml etc. - there are also long. That's strange. Possible adding dots inside the balance helps? Like 6.579.258.271. Link to comment
50p Posted October 1, 2009 Author Share Posted October 1, 2009 But it seems that my GPS: Anti-Abuse script works correct with the Serials inside the database - that's much more numbers then 6579258271. Yeah, these tables are BLOBs, but is this the only way to work with high numbers? Whats about the IPs inside the banlist.xml etc. - there are also long.That's strange. Possible adding dots inside the balance helps? Like 6.579.258.271. As I said, there are a few ways to workaround and I chose MTA accounts because it's simple and every resource can easily get money from MTA accounts. What has got .xml to do with SQLite? I think you have no idea what "data types" are and don't read what I've written in my previous posts or you just act a noob. Link to comment
XetaQuake Posted October 1, 2009 Share Posted October 1, 2009 Erm...aha. I read all of your Posts, but the new accountdata method are NOT working with much money....that was just an info by my side! What ever....I'm going to use the Old version i fixed myself (Marker) and using TEXT. I just had given you an info, because i think an resource should work with an new version, and not only with an older one, if anyone have much money. Have a good night. Over. Link to comment
Johan Even Posted October 12, 2009 Share Posted October 12, 2009 I downloaded the latest version yesterday and there's some problem with it. The bank entrance/exit markers are present, and the ATMs do work, however there is no marker inside the bank. So when a player enters bank, nothing happens. Reinstalled the resource twice, and it's the latest version. The bank commands however work in front of the bank desk, namely /deposit works as expected, and /withdraw 100 does withdraw 100 from the account, but adds 200 to my pocket money. Besides, when started and restarted in the console, the resource creates a new DB table for the accounts. Why? Link to comment
50p Posted March 17, 2010 Author Share Posted March 17, 2010 I downloaded the latest version yesterday and there's some problem with it.The bank entrance/exit markers are present, and the ATMs do work, however there is no marker inside the bank. So when a player enters bank, nothing happens. Reinstalled the resource twice, and it's the latest version. The bank commands however work in front of the bank desk, namely /deposit works as expected, and /withdraw 100 does withdraw 100 from the account, but adds 200 to my pocket money. Besides, when started and restarted in the console, the resource creates a new DB table for the accounts. Why? It is now fixed in version 2.3. Link to comment
Bssol Posted August 31, 2010 Share Posted August 31, 2010 hi all nice job, but i can't download it!! please upload it to mediafire Link to comment
Bssol Posted August 31, 2010 Share Posted August 31, 2010 ????? please i want this resource !!! Link to comment
dzek (varez) Posted August 31, 2010 Share Posted August 31, 2010 be patient please.. Making multi post doesnt have any sense, and wont force anybody to reupload Link to comment
50p Posted September 1, 2010 Author Share Posted September 1, 2010 http://scripteditor.beta.mtasa.com/50p/bank.zip Link to comment
Bssol Posted September 1, 2010 Share Posted September 1, 2010 thaaaaaanks !!! you are great! Link to comment
robert-stock Posted September 8, 2010 Share Posted September 8, 2010 Thanks for sharing the zip file Link to comment
Recommended Posts