So the project is an online MMO. It uses the uMMORPG2D asset (which in turn uses UNET).
The code in question has been working fine for the last week without incident, and hasn't been modified in any way in that time at all. However now it suddenly is throwing this error. I'm at a loss.
To complicate matters further, on my own build/version of the project it all runs fine. I do not get this error. However a friend who runs the exact same build/version does get this error.
The line that is claiming to be broken is extremely simple (couldn't be simpler). All it does is it sets one integer equal to another....the only potential problem is the integer being set is a [SyncVar] (but again, this has been the case for the last week+)
Below is the relevant code;
[SyncVar]
internal int mainID = 0;
public void SetIndices(int bodyIndex, [...])
{
mainID = bodyIndex;
[...]
}
SetIndices gets called from
int bodyID = Convert.ToInt32((long)mainrow[5]);
[...]
charCreator.SetIndices(bodyID, [...]);
There is no cast exception or anything of the sort (as far as I know) so I see no reason why this would cause an error?
The actual error is
InvalidProgramException: Invalid IL code in CharacterCreator:set_NetworkmainID (int): IL_0011: call
0x2b00000a