Atlas1205 14 Posted April 2, 2017 for example, when im trying to reset my mission on a server, which has player status saved into the server's profilenamespace as variables, and they are all in a format a 'rum_(player UID)". what kind of code can i use to set all variables starting with "rum_" to nil? call me silly, but i've tried this, and the result was disastrous... private _gameanduid = format ["rum_%1",_i]; for "_i" from 0 to 99999999999999999 do {profilenamespace setVariable [_gameanduid,nil]}; Share this post Link to post Share on other sites
killzone_kid 1326 Posted April 2, 2017 hint str _a; _a = _b + _c; _b = 1; _c = 2; I don't understand why this doesn't work? Please help! 2 Share this post Link to post Share on other sites
Atlas1205 14 Posted April 2, 2017 4 minutes ago, killzone_kid said: hint str _a; _a = _b + _c; _b = 1; _c = 2; I don't understand why this doesn't work? Please help! I don't get it... Share this post Link to post Share on other sites
killzone_kid 1326 Posted April 2, 2017 4 minutes ago, shape1205 said: I don't get it... It was a joke, you are using variable before defining it. This is like basics, man. Anyway this is how you can clean profile namespace: { if (_x find "rum_" == 0) then { profileNamespace setVariable [_x, nil]; }; } forEach allVariables profileNamespace; saveProfileNamespace; Share this post Link to post Share on other sites
Atlas1205 14 Posted April 2, 2017 1 minute ago, killzone_kid said: It was a joke, You are using variable before defining it. This is like basics, man. Anyway this is how you can clean profile namespace: { if (_x find "rum_" == 0) then { profileNamespace setVariable [_x, nil]; }; } forEach allVariables profileNamespace; saveProfileNamespace; ah, no wonder i had to rearrange their order to get 3... thanks for your help. really need to look through the whole wiki next time... didn't know there is such thing "allvariables" 1 Share this post Link to post Share on other sites
fn_Quiksilver 1633 Posted April 3, 2017 only works in editor, allvariables profilenamespace disabled in MP (praise the gods) Share this post Link to post Share on other sites
Atlas1205 14 Posted April 4, 2017 17 hours ago, fn_Quiksilver said: only works in editor, allvariables profilenamespace disabled in MP (praise the gods) is there a workaround? i see there's an example on community wiki, but not sure how to do it. currently making a mission that stores player status to server's profilenamespace, so I myself come up with a workround, that is storing all player data to one variable, and setting it to nil would be all i need to do to reset the progress. Share this post Link to post Share on other sites
sarogahtyp 1105 Posted April 4, 2017 you could create an array and store all UIDs since server start / last reset in it. Then you have all the variable names you need. Share this post Link to post Share on other sites