# SetPlrExtraData

Player
4.9.1.0 GWE
any
int player Player for whom additional data is saved.
string data_name Name for the data.
any Data Data to be saved.
With this function additional data can be saved in player's file. This can be used to preserve values across scenarios, for example for RPGs or highscores. If successful, the saved value is returned.
No objects or strings may be saved.
Because all scenarios use the same storage, the name for the data should be prefixed with the scenario name or your developer id.
Timer: for(var i=0; i<GetPlayerCount(); i++) SetPlrExtraData(i, "MySzen_Wealth", GetWealth(i)); return();

Initialize: for(var i=0; i<GetPlayerCount(); i++) SetWealth(i, GetPlrExtraData(i, "MySzen_Wealth")); return();
The first function periodically saves the wealth with the name "MySzen_Wealth" in the player's file. If the round is restarted, the wealth is restored in Initialize.
GetPlrExtraData
SetCrewExtraData
PeterW
2002-01