LoginLogin

MPSTART resets MPSET values

Root / Programming Questions / [.]

SquareFingersCreated:
On one system:
MPSET 0,1
MPSTART 2,"Test"
PRINT MPGET(MPLOCAL,0)
On the other:
MPSTART 2,"Test"
PRINT MPGET(1-MPLOCAL,0)
Both will print 0.

I don't think this is a bug. It's the same idea as SPSET resetting sprite variables to zero, it's just undocumented.

If it's undocumented, it's a bug in the documentation.

I think the documentation for MPSET is clear on that point:
Gets user-defined data from a specified terminal in a wireless communication session
If the session isn't started before using MPSET, undefined behavior should be expected. In this case, initializing the state of every system at the start of a MP session is reasonable.