Author Topic: Bank Ore Limit?  (Read 2911 times)

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Bank Ore Limit?
« on: April 25, 2006, 08:11:10 PM »
Is there a limit to how much ore you can have in the bank?  :unsure:
(I only wonder because 2147483647 is such an odd number)
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline spirit1flyer

  • Hero Member
  • *****
  • Posts: 621
Bank Ore Limit?
« Reply #1 on: April 25, 2006, 11:19:37 PM »
that number has something to do with the code its in I think.

I don't think it was something you could set.
"Until you stalk and overrun You can't devour anyone"


Loyal Xfir supporter

Offline TH300

  • Hero Member
  • *****
  • Posts: 1404
    • http://op3game.net
Bank Ore Limit?
« Reply #2 on: April 26, 2006, 10:49:04 AM »
its 2^31-1, the biggest number that fits into a 32-bit signed integer type.

Offline zigzagjoe

  • Hero Member
  • *****
  • Posts: 626
Bank Ore Limit?
« Reply #3 on: April 26, 2006, 09:41:42 PM »
depends if its a int or a bigint type. int i think is a 32bit int and bigint is a long, but dont quote me on that. as i remeber its a int type atm

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Bank Ore Limit?
« Reply #4 on: April 27, 2006, 02:23:33 PM »
Yep, the store uses a signed 32 bit integer value to store the money value in the bank. (An INT type in MySQL, since MySQL is the database backend for the forum and the store)

If this isn't big enough I could increase it to a BIGINT (which I believe is a 64 bit signed integer), I wouldn't have to change the store code at all (just the one field in the database table definition)

If you exceed that amount, it's either going to have a ceiling of 2147483647, or it may wrap around to -2147483648. (underflow)

Offline Vexhare

  • Full Member
  • ***
  • Posts: 120
Bank Ore Limit?
« Reply #5 on: April 27, 2006, 07:09:29 PM »
I don't think I will have that much ever.

Offline Freeza-CII

  • Administrator
  • Hero Member
  • *****
  • Posts: 2308
Bank Ore Limit?
« Reply #6 on: April 29, 2006, 06:50:44 AM »
Bah dont even worry about ore whats the point nothing to spend it on

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Bank Ore Limit?
« Reply #7 on: April 29, 2006, 07:42:12 AM »
Quote
Is there a limit to how much ore you can have in the bank?  :unsure:
(I only wonder because 2147483647 is such an odd number)
2147483647 is NOT an odd number

why do ""normal"" people always say things like that ?  
"why is a kilobyte 1024 ?  .. it is such an odd number"

i thought my 32nd brithday was a bigger occasion then my 30th. people didn't understand that

why do people look at me funny when i ask if they have a box with 256 vitamine pills instead of 250 ?

how come people call 65536 .. 65k, and not 64k ??



i mean .. no one argues with the $64000 question, being "off" complaining it shuld be a $50000 question instead... so why bother about 2147483647, saying it is an ODD number... it's not! it's MAXINT  for signed integers :)



PS: how the HELL did you get it so high ?
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz

Offline Mcshay

  • Administrator
  • Sr. Member
  • *****
  • Posts: 404
Bank Ore Limit?
« Reply #8 on: April 29, 2006, 07:56:00 AM »
Quote
2147483647 is NOT an odd number
However, it literaly is an odd number. :P

Offline Sl0vi

  • Sr. Member
  • ****
  • Posts: 464
Bank Ore Limit?
« Reply #9 on: April 29, 2006, 09:13:04 AM »
Quote
PS: how the HELL did you get it so high ?
probably by making a lot of posts, and collecting his interest everyday. The interest grows exponentially, meaning he'll eventually start receiving crazy amounts of ore.

edit - maybe he even won something at the casino
« Last Edit: April 29, 2006, 09:15:02 AM by Sl0vi »
!!!YAY!!!

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Bank Ore Limit?
« Reply #10 on: April 30, 2006, 01:44:15 PM »
Quote
how come people call 65536 .. 65k, and not 64k ??
Depends if they're thinking in base-2 kilobytes or base-10 kilobytes.

1 kilobyte in base-2 = 1024 bytes
1 kilobyte in base-10 = 1000 bytes

Of course we know that the first case is the correct one. However people continually mess this up.

There are ways to differentiate - I know the unix 'dd' command uses capital and lowercase to differentiate...

If you specify a blocksize using 'bs=1K' you get 1024 bytes for a blocksize. if you use 'bs=1k' you get 1000 byte blocksize.

There are other ways too like KiB / MiB etc...

Offline Freeza-CII

  • Administrator
  • Hero Member
  • *****
  • Posts: 2308
Bank Ore Limit?
« Reply #11 on: May 07, 2006, 11:21:43 PM »
Ok that is interesting and all but there wouldnt need to be a ore upper limit if there was stuff to spend ore on and a max interest %

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Bank Ore Limit?
« Reply #12 on: May 08, 2006, 01:29:12 AM »
good point.
You can spend your money in the casino: guaranteed to loose!
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz