OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: ModestNovice on 17 Jan 2009, 18:09:54
-
I am just wondering if anyone knows if it is possible in ArmA alone, to save a variable and retrieve it after a server restart/crash. of course if you have any ideas how to? :confused:
-
Nope, you still need to use ArmALib. Nothing has changed there ;P
-
lol thanks Spooner ;)
-
you can try the old OFP hack
http://community.bistudio.com/wiki/saveStatus
http://community.bistudio.com/wiki/loadStatus
Sinews_of_War and WGL5 used it for OFP.
http://community.bistudio.com/wiki/Sinews_of_War
-
Neither command is working properly for me (at least when used in regular missions, I haven't checked them for campaigns). ProcMon (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx) tells me that ArmA uses the wrong path to find the "objects.sav":
C:\Users\<username>\Documents\ArmA Other Profiles\<playername>\Saved\C:\Users\<username>\Documents\ArmA Other Profiles\<playername>\objects.sav
Looks like someone at BIS should look up the difference between an absolute and a relative path again... ;)
-
If you try using saveStatus/loadStatus in a SP (and, I assume, MP) environment, the boolean the command returns will be FALSE -> i.e., the saving failed. So I don't know if that 'works' any more, or how it did when it did. :)
Wolfrug out.
-
Well, it simply has to fail since this path won't be found on any system. :D
My yet to be finished injection DLL could be able to detect this and return a fake handle (so ArmA thinks the file exists but is actually accessing some other file). But then if one has to use some sort of "ScriptLink" he won't need this feature anyway.
Anyway, is the filestructure of the objects.sav described somewhere? Or do I have to create a dummy campain and reveng it on my own? ;)
-
My recollection is that these 2 commands save and load to and from the Campaigns folder using the supplied file name.
At least for OFP, not sure about ArmA.
Planck