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

This commit is contained in:
NovaRain
2019-09-24 16:50:50 +08:00
parent 04d47d10ad
commit 552a2a185e
5 changed files with 112 additions and 74 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"