squeeze 22 Posted June 15, 2009 if Array1 = Array2 changing either will change the other since they both point to Array1. But I've found when you load a saved game changing Array2 dosen't change either Array1 or Array2, is this a bug or will it be fixed in the future. using the set command to change array2 Array2 set[0,(Array2 select 0) + 1]; sample missions, works like you would expect, when loaded from saved game radio Bravo dosen't work, unless you use radio Alpha first. Share this post Link to post Share on other sites
Stalker15 10 Posted June 15, 2009 (edited) Where i must paste that , in command channel? if yes , this don't work Array2 set[0,(Array2 select 0) + 1]; Edited June 15, 2009 by Stalker15 Share this post Link to post Share on other sites
UNN 0 Posted June 15, 2009 (edited) Things like pointers get lost with saved games. Saving just writes the content of a variable to a text file. One way round it is to add checks for a restored saved game into your code. The most vulnerable scripts are those that have loops running for any amount of time, or large scripts that contain a few sleep or While, forEach loops e.t.c In Arma the Time command was reset once a saved game was loaded. So in your case you can grab the Time into a local variable. Then in your loops and after each Sleep command, do this: _Blah=_This Select 0;//Grab the scripts start time_StartTime=Time;Sleep 10;//Restore the array pointersIf (Time<_StartTime) Then { Array1 = Array2; _StartTime=Time; };//Do something with the new array pointerArray2 set[0,(Array2 select 0) + 1];Hint Str (Array1 Select 0);[/Code] Edited June 15, 2009 by UNN Share this post Link to post Share on other sites
Stalker15 10 Posted June 15, 2009 (edited) Sorry , i don't understand this, im not scripter , so where i paste it? and what's name have file with amount start money??? Edited June 15, 2009 by Stalker15 Share this post Link to post Share on other sites
Spooner 0 Posted June 15, 2009 (edited) Not sure about this issue you are claiming (didn't run test) but you are always outputting the value of Array1 twice, rather than each of the separate arrays, which is misleading: player sideChat format ["Array1 = %1 Array2 = %1", Array1, Array2] It should be: player sideChat format ["Array1 = %1 Array2 = %2", Array1, Array2] Edited June 15, 2009 by Spooner Share this post Link to post Share on other sites
squeeze 22 Posted June 16, 2009 lo,l here I was thinking saved games was a new feature in arma2 and looking for a new command, guess I paid the price for not having single player as part of my vocaublary......thanks UNN Share this post Link to post Share on other sites
squeeze 22 Posted June 16, 2009 bummer "time" and "servertime" are saved in Arma2. Since nothing worked until I changed a "waituntil" to a "@" in the jip code in init.sqs I think I may need to check if all players are null then array1 = array2. there is a bis function for this, I'll try this next weekend. Share this post Link to post Share on other sites
Spooner 0 Posted June 16, 2009 waitUntil is an SQF command, whereas @ is the equivalent command in SQS. SQS is obsolete, so I'd avoid it as much as possible. Share this post Link to post Share on other sites
UNN 0 Posted June 16, 2009 lo,l here I was thinking saved games was a new feature in arma2 Well multiplayer saves are new...I think? JIP adds a whole new dimension to. Since nothing worked until I changed a "waituntil" to a "@" in the jip code in init.sqs Init.sqs and init.sqf, along with AddAction script names. Are two of the few cases where the file extension you use dictates the expected script format. If you use init.sqf then the WaitUntil command will work ok. Share this post Link to post Share on other sites