Refactored code in Arrays.cpp and fixed save_array() script function.

* related to "corrupted" savegames in #265.
This commit is contained in:
NovaRain
2019-09-24 12:30:02 +08:00
parent a17471b624
commit 98199b4e7e
5 changed files with 120 additions and 94 deletions
+2
View File
@@ -212,9 +212,11 @@ use macros sort_array, sort_array_reverse, reverse_array, shuffle_array from sfa
- always returns 0
> void save_array(mixed key, int arrayID):
- makes the array saveable; it will be saved in sfallgv.sav file when saving the game
- arrayID is associated with given "key"
- array becomes permanent (if it was temporary) and "saved"
- key can be of any type (int, float or string)
- if you specify 0 as the key for the array ID, it will make the array "unsaved"
> int load_array(mixed key):
- load array from savegame data by the same key provided in "save_array"