Jump to content

[REL] Banking System 2.3


50p

Recommended Posts

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 post
  • Replies 152
  • Created
  • Last Reply

Top Posters In This Topic

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 post
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 post
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 post
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 post

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 post

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?! :shock:
Link to post
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?! :shock:

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 post

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 post
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 post

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 post
  • 2 weeks later...

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 post
  • 5 months later...
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 post
  • 5 months later...
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...