Fix upgrading or creating a key for a vehicle

Due to the max length of the format command, vehicles with too many items in the gear could not be upgraded,
This commit is contained in:
A Man
2023-05-25 15:14:30 +02:00
parent 69d46beda0
commit 3f1ada6dd9
2 changed files with 4 additions and 4 deletions

View File

@@ -66,9 +66,9 @@ diag_log ("PUBLISH: Attempt " + str(_object));
_dir = _worldspace select 0;
_uid = _worldspace call dayz_objectUID2;
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _damage , _characterID, _worldspace, _inv, _newHitpoints, _fuel,_uid];
_key = str formatText["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _damage , _characterID, _worldspace, _inv, _newHitpoints, _fuel,_uid];
#ifdef OBJECT_DEBUG
diag_log ("HIVE: WRITE: "+ str(_key));
diag_log ("HIVE: WRITE: "+ _key);
#endif
_key call server_hiveWrite;

View File

@@ -79,9 +79,9 @@ diag_log ("PUBLISH: Attempt " + str(_object));
_dir = _worldspace select 0;
_uid = _worldspace call dayz_objectUID2;
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _damage , _characterID, _worldspace, _inv, _newHitpoints, _fuel,_uid];
_key = str formatText["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _damage , _characterID, _worldspace, _inv, _newHitpoints, _fuel,_uid];
#ifdef OBJECT_DEBUG
diag_log ("HIVE: WRITE: "+ str(_key));
diag_log ("HIVE: WRITE: "+ _key);
#endif
_key call server_hiveWrite;