News:

We've upgraded the forum software.
You may need to log in again or reset your password!

Main Menu

Bank Ore Limit?

Started by Sirbomber, April 25, 2006, 08:11:10 PM

Sirbomber

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

spirit1flyer

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

TH300

its 2^31-1, the biggest number that fits into a 32-bit signed integer type.

zigzagjoe

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

BlackBox

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)

Vexhare

I don't think I will have that much ever.

Freeza-CII

Bah dont even worry about ore whats the point nothing to spend it on

Eddy-B

QuoteIs 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

Mcshay

Quote2147483647 is NOT an odd number
However, it literaly is an odd number. :P

Sl0vi

#9
QuotePS: 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
!!!YAY!!!

BlackBox

Quotehow 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...

Freeza-CII

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 %

Eddy-B

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