'Client doesn't sync own changed value after rejoining a room

We are making a multiplayer simulation and we stumbled upon the problem, that when a client joins a room, changes a value in an inputfield and leaves, when rejoined the value is set back to what it originally was.

So basically if someone hosts a simulation and puts the value 80 in the inputfield, if someone else joins it shows that the value in that inputfield is 80, just how it's supposed to work. When the client changes the value to 60 and rejoins, the value is set back to 80, but on the master it still says 60, and the program continues working with the value 60.

We don't know how to fix our problem, but we think there is some kind of problem where the client doesnt want to sync it's own changes.

This is how our RPC looks like:

 [PunRPC]
void RPC_Sync(double vAmount, double k1Amount, double k2Amount, double dAmount, double flow1, double flow2, double flow3, double flow4, double flow5, bool _flowing, bool _flowing2, bool _flowing3, double frc1, double frc1b, double frc3, double frc3b, double lrc1, double lrc1b, double lrc2, double lrc2b, double frc5, double frc5b, double lrc3, double lrc3b)
{
    Voorraadvat.VoorraadAmount = vAmount;
    Kolom1.kol1Amount = k1Amount;
    Kolom2.kol2Amount = k2Amount;
    Desorptievat.DesorptieAmount = dAmount;
    VNKFlow1 = flow1;
    VNKFlow2 = flow2;
    KNDFlow1 = flow3;
    KNDFlow2 = flow4;
    flowing = _flowing;
    flowing2 = _flowing2;
    DNVFlow1 = flow5;
    flowing3 = _flowing3;
    frc1_input = frc1;
    frc1b_input = frc1b;
    frc3_input = frc3;
    frc3b_input = frc3b;
    lrc1_input = lrc1;
    lrc1b_input = lrc1b;
    lrc2_input = lrc2;
    lrc2b_input = lrc2b;
    frc5_input = frc5;
    frc5b_input = frc5b;
    lrc3_input = lrc3;
    lrc3b_input = lrc3b;
}

And this is how our RPC call looks like:

PV.RPC("RPC_Sync", RpcTarget.AllBufferedViaServer, Voorraadvat.VoorraadAmount, Kolom1.kol1Amount, Kolom2.kol2Amount, Desorptievat.DesorptieAmount, VNKFlow1, VNKFlow2, KNDFlow1, KNDFlow2, DNVFlow1, flowing, flowing2, flowing3, frc1_input, frc1b_input, frc3_input, frc3b_input, lrc1_input, lrc1b_input, lrc2_input, lrc2b_input, frc5_input, frc5b_input, lrc3_input, lrc3b_input);

I hope someone knows what we can do about this, we have searched online if someone had the same problem, but couldn't find anything. We also tried changing the rpc target, but it all had the same outcome.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source