#Splitting money evenly

1 messages · Page 1 of 1 (latest)

timber copper
#

I have a clip but forgot to post it but the other night when playing with Ford and Phoenix, we noticed when split into split economy and sharing all money evenly it halves the total money before sharing the even amount, when switching back to shared it adds them all back up but switching back halves it again, the video I have shows the second switch halving it, can’t share now because I’m on my phone at work

frail sorrel
#

Its suppose to "divide" the money up auto on switching that setting?

timber copper
#

It would half the amount then distribute the remaining

#

Give me about 20 ish minutes, I’ll be back at my computer by then

frail sorrel
# timber copper Give me about 20 ish minutes, I’ll be back at my computer by then

He is telling you the system is double dipping the division instead of just dividing once.

Right now your logic probably does something like this:

  1. TotalMoney = Sum of all players' money.
  2. When switching to Split Economy:
    EachPlayer = TotalMoney / NumPlayers.
  3. But what he says is happening is this:
    When you switch the mode again, you take the already divided money, treat that as the total, divide it again, and everyone loses half the value because you are dividing a number that was already divided.

In plain English he means:

  • They had 1000 combined.
  • Switching to split mode makes it 500 + 500 (correct).
  • Switching back and forth again should keep it 500 + 500 or restore total.
  • Instead it is doing:
    500 total → divided again into 250 + 250.
  • So the total shrinks to 500, then 250, then 125, etc.

He is telling you:

The code is dividing the money each time the setting flips instead of preserving the original combined amount.

Your response confused him because you framed it like the intended behavior is to divide the money when the option is toggled. He is saying:

Yes, it should divide ONCE, not divide again and again on every toggle.

Your system is probably missing something like:

  • A cached true total
    or
  • A check that prevents division if you are already in split mode
    or
  • Logic to recombine correctly before re-splitting.

If you want, I can help you write the proper logic so it never double-divides.

#

This?

timber copper
#

Form what I can tell putting it into split economy doesn’t affect the amount, we started with 50k but when it was split we each only got about 8k, we then combined it because Phoenix went afk, then split it again when he came back and it halves when ford hit the split evenly button

timber copper
frail sorrel
#

Just 3?

timber copper
#

3 Ford, Phoenix and myself

frail sorrel
#

Because i cannot recreate this in the editor

#

Who was the host?

timber copper
#

Ford was

frail sorrel
#

and what exactly did they do per split?

#

because i just made a game gave myself 20 k to equal 50k . and split back adn forwth between control modes ?

#

and everytime i got 16k roughly

timber copper
#

He hit the split evenly button as far as I’m aware

frail sorrel
#

for each player

#

Something else is going ?

frail sorrel
#

@hallow crescent

#

It sounds like someone bought a unit or something before the money was split?