diff --git a/addons/org/functions/fnc_initOrgStore.sqf b/addons/org/functions/fnc_initOrgStore.sqf index a90f517..0f0591a 100644 --- a/addons/org/functions/fnc_initOrgStore.sqf +++ b/addons/org/functions/fnc_initOrgStore.sqf @@ -14,7 +14,7 @@ * Organization interface */ -private _orgStoreDeclaration = [ +private _orgStoreInterface = createHashMapObject [[ ["#type", "IOrganizationStore"], ["#create", { private _store = GETMVAR(FORGE_STORE_REG,nil); @@ -101,7 +101,7 @@ private _orgStoreDeclaration = [ if (_key == "") exitWith { ERROR_MSG("Key cannot be empty"); nil }; private _store = GETMVAR(FORGE_STORE_REG,nil); - private _org = _store call ["get", ["organizations", _key]] + private _org = _store call ["get", ["organizations", _key]]; if (isNil "_org") exitWith { ERROR_MSG_1("Organization with composite key %1 not found",_key); nil }; @@ -117,7 +117,7 @@ private _orgStoreDeclaration = [ _store call ["delete", ["organizationNameIndex", _key]]; - if (isNil "_key") exitWith { ERROR_MSG_1("Key for organization not found",_key); false }; + if (isNil "_key") exitWith { ERROR_MSG_1("Key for organization not found: %1",_key); false }; _store call ["delete", ["organizations", _key]]; @@ -128,8 +128,7 @@ private _orgStoreDeclaration = [ true }] -]; +]]; -private _orgStoreInterface = createHashMapObject [_orgStoreDeclaration]; SETMVAR(FORGE_ORG_STORE_REG,_orgStoreInterface); GETMVAR(FORGE_ORG_STORE_REG,nil) \ No newline at end of file