1. Dashboard
  2. Forum
    1. Unerledigte Themen
  3. Downloads
  4. Galerie
    1. Alben
  5. Toolbox
    1. Passwort Generator
    2. Portchecker
  6. Mitglieder
    1. Mitgliedersuche
    2. Benutzer online
    3. Trophäen
    4. Team
So: 08 Juni 2025
  • Anmelden oder registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Forum
  • Dateien
  • Seiten
  • Bilder
  • Erweiterte Suche

Schön, dass du den Weg zu NodeZone.net gefunden hast! Aktuell bist du nicht angemeldet und kannst deshalb nur eingeschränkt auf unsere Community zugreifen. Um alle Funktionen freizuschalten, spannende Inhalte zu entdecken und dich aktiv einzubringen, registriere dich jetzt kostenlos oder melde dich mit deinem Account an.

Anmelden oder registrieren
    1. Nodezone.net Community
    2. Forum
    3. Gameserver & Hosting
    4. ArmA Series - ArmA 3 / Reforger
    5. Hilfeforum

    Name der Items | fn_processAction.sqf

    • SpongebobUndPatrick
    • 1. August 2017 um 20:33
    • Geschlossen
    • Erledigt
    • SpongebobUndPatrick
      Frischling
      Reaktionen
      1
      Trophäen
      10
      Beiträge
      15
      • 1. August 2017 um 20:33
      • #1

      Hallo,

      ich will gerne wissen welche Variable in der fn_processAction.sqf dafür ist, den Namen des zu verarbeitenden Item und des bereits verarbeiteten Item heraus zu kriegen oder ob es überhaupt so eine Variable gibt, weil ich erkenne jetzt so nichts.

      Spoiler anzeigen
      Code: fn_processAction.sqf
      #include "..\..\script_macros.hpp"
      /*
          File: fn_processAction.sqf
          Author: Bryan "Tonic" Boardwine
          Modified : NiiRoZz
          Description:
          Master handling for processing an item.
          NiiRoZz : Added multiprocess
      */
      private["_vendor","_type","_itemInfo","_oldItem","_newItemWeight","_newItem","_oldItemWeight","_cost","_upp","_hasLicense","_itemName","_oldVal","_ui","_progress","_pgText","_cP","_materialsRequired","_materialsGiven","_noLicenseCost","_text","_filter","_totalConversions","_minimumConversions"];
      _vendor = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
      _type = [_this,3,"",[""]] call BIS_fnc_param;
      //Error check
      if (isNull _vendor || _type isEqualTo "" || (player distance _vendor > 10)) exitWith {};
      life_action_inUse = true;//Lock out other actions during processing.
      if (isClass (missionConfigFile >> "ProcessAction" >> _type)) then {
          _filter = false;
          _materialsRequired = M_CONFIG(getArray,"ProcessAction",_type,"MaterialsReq");
          _materialsGiven = M_CONFIG(getArray,"ProcessAction",_type,"MaterialsGive");
          _noLicenseCost = M_CONFIG(getNumber,"ProcessAction",_type,"NoLicenseCost");
          _text = M_CONFIG(getText,"ProcessAction",_type,"Text");
      } else {_filter = true;};
      if (_filter) exitWith {life_action_inUse = false;};
      _itemInfo = [_materialsRequired,_materialsGiven,_noLicenseCost,(localize format["%1",_text])];
      if (count _itemInfo isEqualTo 0) exitWith {life_action_inUse = false;};
      //Setup vars.
      _oldItem = _itemInfo select 0;
      _newItem = _itemInfo select 1;
      _cost = _itemInfo select 2;
      _upp = _itemInfo select 3;
      _exit = false;
      if (count _oldItem isEqualTo 0) exitWith {life_action_inUse = false;};
      _totalConversions = [];
      {
          _var = ITEM_VALUE(_x select 0);
          if (_var isEqualTo 0) exitWith {_exit = true;};
          if (_var < (_x select 1)) exitWith {_exit = true;};
          _totalConversions pushBack (floor (_var/(_x select 1)));
      } forEach _oldItem;
      if (_exit) exitWith {life_is_processing = false; hint localize "STR_NOTF_NotEnoughItemProcess"; life_action_inUse = false;};
      if (_vendor in [mari_processor,coke_processor,heroin_processor]) then {
          _hasLicense = true;
      } else {
          _hasLicense = LICENSE_VALUE(_type,"civ");
      };
      _cost = _cost * (count _oldItem);
      _minimumConversions = _totalConversions call BIS_fnc_lowestNum;
      _oldItemWeight = 0;
      {
          _weight = ([_x select 0] call life_fnc_itemWeight) * (_x select 1);
          _oldItemWeight = _oldItemWeight + _weight;
      } count _oldItem;
      _newItemWeight = 0;
      {
          _weight = ([_x select 0] call life_fnc_itemWeight) * (_x select 1);
          _newItemWeight = _newItemWeight + _weight;
      } count _newItem;
      _exit = false;
      if (_newItemWeight > _oldItemWeight) then {
          _netChange = _newItemWeight - _oldItemWeight;
          _freeSpace = life_maxWeight - life_carryWeight;
          if (_freeSpace < _netChange) exitWith {_exit = true;};
          _minimumConversions = floor(_freeSpace / _netChange);
      };
      if (_exit) exitWith {hint localize "STR_Process_Weight"; life_is_processing = false; life_action_inUse = false;};
      /*Setup our progress bar.
      disableSerialization;
      5 cutRsc ["life_progress","PLAIN"];
      _ui = uiNamespace getVariable "life_progress";
      _progress = _ui displayCtrl 38201;
      _pgText = _ui displayCtrl 38202;
      _pgText ctrlSetText format["%2 (1%1)...","%",_upp];
      _progress progressSetPosition 0.01;
      _cP = 0.01;*/
      fertigmitLizenz = {
          {
              [false,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv;
          } count _oldItem;
          {
              [true,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv;
          } count _newItem;
          if (_minimumConversions isEqualTo (_totalConversions call BIS_fnc_lowestNum)) then {[format[localize "STR_NOTF_ProcessedItems", _oldVal,_newItem],"Verarbeitung","green",false] call MSG_fnc_handle;} else {/*nicht genug platz - weniger items*/[format[localize "STR_NOTF_ProcessedItems", _oldVal, _newItem],"Verarbeitung","orange",false] call MSG_fnc_handle;};
          life_is_processing = false;
          life_action_inUse = false;
      };
      fertigohneLizenz = {
          {
              [false,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv;
          } count _oldItem;
          {
              [true,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv;
          } count _newItem;
          //5 cutText ["","PLAIN"];
          if (_minimumConversions isEqualTo (_totalConversions call BIS_fnc_lowestNum)) then {hint localize "STR_NOTF_ItemProcess";} else {hint localize "STR_Process_Partial";};
          CASH = CASH - _cost;
          [format[localize "STR_NOTF_ProcessedItems", _oldVal, _newItem],"Verarbeitung","green",false] call MSG_fnc_handle;
          life_is_processing = false;
          life_action_inUse = false;
      };
          
      life_is_processing = true;
      if (_hasLicense) then {
          [60,[], 
              {_this call fertigmitLizenz},
              {[localize "STR_NOTF_AbortProcess","Verarbeitung","red",false] remoteExec ["MSG_fnc_handle",player]; life_is_processing = false; life_action_inUse = false;},
              format[localize "STR_NOTF_Process",_oldVal],{},["",0]
          ] spawn rl_fnc_progressBar;
          /*for "_i" from 0 to 1 step 0 do {
              sleep  0.28;
              _cP = _cP + 0.01;
              _progress progressSetPosition _cP;
              _pgText ctrlSetText format["%3 (%1%2)...",round(_cP * 100),"%",_upp];
              if (_cP >= 1) exitWith {};
              if (player distance _vendor > 10) exitWith {};
          };
          if (player distance _vendor > 10) exitWith {hint localize "STR_Process_Stay"; 5 cutText ["","PLAIN"]; life_is_processing = false; life_action_inUse = false;};*/
      } else {
          if (CASH < _cost) exitWith {hint format[localize "STR_Process_License",[_cost] call life_fnc_numberText]; 5 cutText ["","PLAIN"]; life_is_processing = false; life_action_inUse = false;};
          /*for "_i" from 0 to 1 step 0 do {
              sleep  0.9;
              _cP = _cP + 0.01;
              _progress progressSetPosition _cP;
              _pgText ctrlSetText format["%3 (%1%2)...",round(_cP * 100),"%",_upp];
              if (_cP >= 1) exitWith {};
              if (player distance _vendor > 10) exitWith {};
          };*/
          
          [90,[], 
              {_this call fertigohneLizenz},
              {[localize "STR_NOTF_AbortProcess","Verarbeitung","red",false] remoteExec ["MSG_fnc_handle",player]; life_is_processing = false; life_action_inUse = false;},
              format[localize "STR_NOTF_Process",_oldItem],{CASH > _cost},["",0]
          ] spawn rl_fnc_progressBar;
          /*if (player distance _vendor > 10) exitWith {hint localize "STR_Process_Stay"; 5 cutText ["","PLAIN"]; life_is_processing = false; life_action_inUse = false;};
          if (CASH < _cost) exitWith {hint format[localize "STR_Process_License",[_cost] call life_fnc_numberText]; 5 cutText ["","PLAIN"]; life_is_processing = false; life_action_inUse = false;};*/
      };
      Alles anzeigen
    • Brizi Jaeger
      Profi
      Reaktionen
      291
      Trophäen
      11
      Beiträge
      1.025
      • 1. August 2017 um 21:13
      • #2

      In der addAction Ingame steht ja und in der Config_process welche items benötigt werden zum Processen und oben wird ja

      Code
      if (isClass (missionConfigFile >> "ProcessAction" >> _type)) then {
       _filter = false;
       _materialsRequired = M_CONFIG(getArray,"ProcessAction",_type,"MaterialsReq");
       _materialsGiven = M_CONFIG(getArray,"ProcessAction",_type,"MaterialsGive");
       _noLicenseCost = M_CONFIG(getNumber,"ProcessAction",_type,"NoLicenseCost");
       _text = M_CONFIG(getText,"ProcessAction",_type,"Text");
      } else {_filter = true;};

      Eigentlich selbsterklärend bin da grad bissl doof im erklären

    • SpongebobUndPatrick
      Frischling
      Reaktionen
      1
      Trophäen
      10
      Beiträge
      15
      • 1. August 2017 um 21:52
      • #3

      Ja allerdings will ich das so aufbauen:

      hint format ["%1 wurde zu %2 verarbeitet.", _altesItem, _neuesItem];

      Allerdings würde es doch nach dem Code so aussehen:

      [["salt_unrefined",1]] wurde zu [["salt_refined",1]] verarbeitet.

      oder halt

      Salz wird verarbeitet [_text] wurde zu ??? verarbeitet. 

    • Brizi Jaeger
      Profi
      Reaktionen
      291
      Trophäen
      11
      Beiträge
      1.025
      • 1. August 2017 um 22:02
      • #4

      hint format ["%1 wurde zu %2 verarbeitet.", _materialsRequired, _materialsGiven];

      Probier mal so wenn ich nen Fehler gemacht habe melden :D

    • SpongebobUndPatrick
      Frischling
      Reaktionen
      1
      Trophäen
      10
      Beiträge
      15
      • 1. August 2017 um 23:06
      • #5

      [["salt_unrefined",1]] wurde zu [["salt_refined",1]] verarbeitet.

      Das ist rausgekommen. Also nicht so wie gewünscht :/

    • blackfisch
      Legende
      Reaktionen
      2.944
      Trophäen
      10
      Beiträge
      5.966
      Dateien
      6
      Bilder
      63
      • 1. August 2017 um 23:49
      • #6

      hint format ["%1 wurde zu %2 verarbeitet.", ITEM_NAME(_materialsRequired select 0 select 0), ITEM_NAME(_materialsGiven select 0 select 0)];

      versuch mal den :P

      #MakeArmaNotWar

      Kein Support via PN & Steam! / No Support via DM & Steam!


      Mit freundlichen Grüßen
      blackfisch
      ______________________

      Web: blackfisch.me

      GitHub: GitHub.com/blackfisch

      Mail: [email protected]

      ______________________
      Wichtige Links:
      [Erklärung|Leitfaden] Code Optimierung

      [Tutorial] life_fnc_MP zu remoteExec

      Ohne Logs & entsprechende Dateien kein Support!

      ______________________

    • SpongebobUndPatrick
      Frischling
      Reaktionen
      1
      Trophäen
      10
      Beiträge
      15
      • 2. August 2017 um 01:46
      • #7

      STR_Item_CopperOre wird verarbeitet...

      Das wird einmal ausgegeben über meiner Progressbar

      und im Hint

      wurde zu verarbeitet.
      Also ohne irgendwas eingesetztes. Außerdem habe ich folgenden Error:

      Spoiler anzeigen
      Code
      1:43:23 Error in expression <;
      
      fertigohneLizenz = {
      if (life_cash < _cost) exitWith {hint format[localize "S>
       1:43:23   Error position: <_cost) exitWith {hint format[localize "S>
       1:43:23   Error Nicht definierte Variable in Ausdruck: _cost
       1:43:23 File core\actions\fn_processAction.sqf [life_fnc_processAction], line 163
       1:43:36 Error in expression <nses" >> _varName >> "variable")];
      
      if (life_cash < _price) exitWith {hint forma>
       1:43:36   Error position: <life_cash < _price) exitWith {hint forma>
       1:43:36   Error Nicht definierte Variable in Ausdruck: life_cash
       1:43:36 File core\actions\fn_buyLicense.sqf [life_fnc_buyLicense], line 74
      Alles anzeigen
      Code: fn_processAction.sqf
      #include "..\..\script_macros.hpp"
      /*
          File: fn_processAction.sqf
          Author: Bryan "Tonic" Boardwine
          Modified : NiiRoZz
      
          Description:
          Master handling for processing an item.
          NiiRoZz : Added multiprocess
      */
      private["_vendor","_type","_itemInfo","_oldItem","_newItemWeight","_newItem","_oldItemWeight","_cost","_upp","_hasLicense","_itemName","_oldVal","_ui","_progress","_pgText","_cP","_materialsRequired","_materialsGiven","_noLicenseCost","_text","_filter","_totalConversions","_minimumConversions"];
      _vendor = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
      _type = [_this,3,"",[""]] call BIS_fnc_param;
      //Error check
      if (isNull _vendor || _type isEqualTo "" || (player distance _vendor > 10)) exitWith {};
      life_action_inUse = true;//Lock out other actions during processing.
      
      if (isClass (missionConfigFile >> "ProcessAction" >> _type)) then {
          _filter = false;
          _materialsRequired = M_CONFIG(getArray,"ProcessAction",_type,"MaterialsReq");
          _materialsGiven = M_CONFIG(getArray,"ProcessAction",_type,"MaterialsGive");
          _noLicenseCost = M_CONFIG(getNumber,"ProcessAction",_type,"NoLicenseCost");
          _text = M_CONFIG(getText,"ProcessAction",_type,"Text");
      } else {_filter = true;};
      
      if (_filter) exitWith {life_action_inUse = false;};
      
      _itemInfo = [_materialsRequired,_materialsGiven,_noLicenseCost,(localize format["%1",_text])];
      if (count _itemInfo isEqualTo 0) exitWith {life_action_inUse = false;};
      
      //Setup vars.
      _oldItem = _itemInfo select 0;
      _newItem = _itemInfo select 1;
      _cost = _itemInfo select 2;
      _upp = _itemInfo select 3;
      _exit = false;
      if (count _oldItem isEqualTo 0) exitWith {life_action_inUse = false;};
      
      _totalConversions = [];
      {
          _var = ITEM_VALUE(_x select 0);
          if (_var isEqualTo 0) exitWith {_exit = true;};
          if (_var < (_x select 1)) exitWith {_exit = true;};
          _totalConversions pushBack (floor (_var/(_x select 1)));
      } forEach _oldItem;
      
      if (_exit) exitWith {life_is_processing = false; hint localize "STR_NOTF_NotEnoughItemProcess"; life_action_inUse = false;};
      
      if (_vendor in [mari_processor,coke_processor,heroin_processor]) then {
          _hasLicense = true;
      } else {
          _hasLicense = LICENSE_VALUE(_type,"civ");
      };
      
      _cost = _cost * (count _oldItem);
      private ["_oldItem"];
      _oldItem = _itemInfo select 0;
      
      _minimumConversions = _totalConversions call BIS_fnc_lowestNum;
      _oldItemWeight = 0;
      {
          _weight = ([_x select 0] call life_fnc_itemWeight) * (_x select 1);
          _oldItemWeight = _oldItemWeight + _weight;
      } count _oldItem;
      
      _newItemWeight = 0;
      {
          _weight = ([_x select 0] call life_fnc_itemWeight) * (_x select 1);
          _newItemWeight = _newItemWeight + _weight;
      } count _newItem;
      
      _exit = false;
      
      if (_newItemWeight > _oldItemWeight) then {
          _netChange = _newItemWeight - _oldItemWeight;
          _freeSpace = life_maxWeight - life_carryWeight;
          if (_freeSpace < _netChange) exitWith {_exit = true;};
          _minimumConversions = floor(_freeSpace / _netChange);
      };
      
      if (_exit) exitWith {hint localize "STR_Process_Weight"; life_is_processing = false; life_action_inUse = false;};
      
      /*Setup our progress bar.
      disableSerialization;
      5 cutRsc ["life_progress","PLAIN"];
      _ui = uiNamespace getVariable "life_progress";
      _progress = _ui displayCtrl 38201;
      _pgText = _ui displayCtrl 38202;
      _pgText ctrlSetText format["%2 (1%1)...","%",_upp];
      _progress progressSetPosition 0.01;
      _cP = 0.01;*/
      
      fertigmitLizenz = {
          {
              [false,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv;
          } count _oldItem;
      
          {
              [true,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv;
          } count _newItem;
      
          if (_minimumConversions isEqualTo (_totalConversions call BIS_fnc_lowestNum)) then {[format[localize "STR_NOTF_ProcessedItems", ITEM_NAME(_materialsRequired select 0 select 0), ITEM_NAME(_materialsGiven select 0 select 0)],"Verarbeitung","green",false] call MSG_fnc_handle;} else {/*nicht genug platz - weniger items*/[format[localize "STR_NOTF_ProcessedItems", ITEM_NAME(_materialsRequired select 0 select 0), ITEM_NAME(_materialsGiven select 0 select 0)],"Verarbeitung","orange",false] call MSG_fnc_handle;};
          life_is_processing = false;
          life_action_inUse = false;
      };
      
      fertigohneLizenz = {
          if (CASH < _cost) exitWith {hint format[localize "STR_Process_License",[_cost] call life_fnc_numberText]; 5 cutText ["","PLAIN"]; life_is_processing = false; life_action_inUse = false;};
          {
              [false,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv;
          } count _oldItem;
      
          {
              [true,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv;
          } count _newItem;
      
          //5 cutText ["","PLAIN"];
          if (_minimumConversions isEqualTo (_totalConversions call BIS_fnc_lowestNum)) then {hint localize "STR_NOTF_ItemProcess";} else {hint localize "STR_Process_Partial";};
          CASH = CASH - _cost;
          [format[localize "STR_NOTF_ProcessedItems", ITEM_NAME(_materialsRequired select 0 select 0), ITEM_NAME(_materialsGiven select 0 select 0)],"Verarbeitung","green",false] call MSG_fnc_handle;
          life_is_processing = false;
          life_action_inUse = false;
      };
          
      life_is_processing = true;
      
      if (_hasLicense) then {
          [60,[], 
              {_this call fertigmitLizenz},
              {[localize "STR_NOTF_AbortProcess","Verarbeitung","red",false] remoteExec ["MSG_fnc_handle",player]; life_is_processing = false; life_action_inUse = false;},
              format[localize "STR_NOTF_Process",ITEM_NAME(_materialsRequired select 0 select 0)],{},["",0]
          ] spawn rl_fnc_progressBar;
          /*for "_i" from 0 to 1 step 0 do {
              sleep  0.28;
              _cP = _cP + 0.01;
              _progress progressSetPosition _cP;
              _pgText ctrlSetText format["%3 (%1%2)...",round(_cP * 100),"%",_upp];
              if (_cP >= 1) exitWith {};
              if (player distance _vendor > 10) exitWith {};
          };
          if (player distance _vendor > 10) exitWith {hint localize "STR_Process_Stay"; 5 cutText ["","PLAIN"]; life_is_processing = false; life_action_inUse = false;};*/
      } else {
          if (CASH < _cost) exitWith {hint format[localize "STR_Process_License",[_cost] call life_fnc_numberText]; 5 cutText ["","PLAIN"]; life_is_processing = false; life_action_inUse = false;};
      
          /*for "_i" from 0 to 1 step 0 do {
              sleep  0.9;
              _cP = _cP + 0.01;
              _progress progressSetPosition _cP;
              _pgText ctrlSetText format["%3 (%1%2)...",round(_cP * 100),"%",_upp];
              if (_cP >= 1) exitWith {};
              if (player distance _vendor > 10) exitWith {};
          };*/
          
          [90,[], 
              {_this call fertigohneLizenz},
              {[localize "STR_NOTF_AbortProcess","Verarbeitung","red",false] remoteExec ["MSG_fnc_handle",player]; life_is_processing = false; life_action_inUse = false;},
              format[localize "STR_NOTF_Process",ITEM_NAME(_materialsRequired select 0 select 0)],{},["",0]
          ] spawn rl_fnc_progressBar;
      
          /*if (player distance _vendor > 10) exitWith {hint localize "STR_Process_Stay"; 5 cutText ["","PLAIN"]; life_is_processing = false; life_action_inUse = false;};
          if (CASH < _cost) exitWith {hint format[localize "STR_Process_License",[_cost] call life_fnc_numberText]; 5 cutText ["","PLAIN"]; life_is_processing = false; life_action_inUse = false;};*/
      };
      Alles anzeigen
    • SpongebobUndPatrick
      Frischling
      Reaktionen
      1
      Trophäen
      10
      Beiträge
      15
      • 5. August 2017 um 21:43
      • #8

      Hat niemand eine Idee?

      Verzweifle langsam an diesem Problem, habe auch schon ein $ versucht davor zu machen und es funktioniert nicht.

      Im Spoiler (ein Beitrag drüber) sind alle Informationen, die nötig sind.

    • Brizi Jaeger
      Profi
      Reaktionen
      291
      Trophäen
      11
      Beiträge
      1.025
      • 5. August 2017 um 23:02
      • #9

      Probier mal das hier :

      TitleText _________ titleText[format["Du hast %1 in %2 verarbeitet.",_oldItem,_newItem],"PLAIN"];

      Hint Text _________ hint format ["Du hast %1 in %2 verarbeitet.",_oldItem,_newItem];

    • SpongebobUndPatrick
      Frischling
      Reaktionen
      1
      Trophäen
      10
      Beiträge
      15
      • 6. August 2017 um 00:25
      • #10

      Habe ich am Anfang auch probiert, nicht das gewünschte Ergebnis.

    • nocnico
      Anfänger
      Reaktionen
      8
      Trophäen
      10
      Beiträge
      45
      • 6. August 2017 um 00:38
      • #11

      hint format["%1 wurde zu %2 verarbeitet.", localize (getText(missionConfigFile >> "VirtualItems" >> _oldItem >> "displayName")), localize (getText(missionConfigFile >> "VirtualItems" >> _newItem >> "displayName"))];

      Probier mal das.

      Arma3 Mod Developer / Scripter

      http://steamcommunity.com/id/nocnico/myworkshopfiles/

    • SpongebobUndPatrick
      Frischling
      Reaktionen
      1
      Trophäen
      10
      Beiträge
      15
      • 6. August 2017 um 02:03
      • #12

      Bei deiner Version:

      Spoiler anzeigen
      Code
      1:49:31 Error in expression <ext(missionConfigFile >> "VirtualItems" >> _oldItem >> "displayName"))],{},["",0>
       1:49:31   Error position: <>> _oldItem >> "displayName"))],{},["",0>
       1:49:31   Error >>: Typ Array, erwartet Zeichenfolge
       1:49:31 File core\actions\fn_processAction.sqf [life_fnc_processAction], line 191

      Hab dann mal bei _olditem in zwei " gesetzt, dann wird aber nichts angezeigt.

    • nocnico
      Anfänger
      Reaktionen
      8
      Trophäen
      10
      Beiträge
      45
      • 6. August 2017 um 17:38
      • #13

      Das Problem ist, dass _oldItem und _newItem Arrays sind.

      Man müsste jedes einzelne Element des Arrays auslesen und localizen (ich denke da an forEach) und dann als Text in eine Variable setzen, welche dann im Hint ausgegeben wird.

      z.b. so:

      C
      _text1 = "";
      _text2 = "";
      
      {
          _text1 = _text1 + (localize (getText(missionConfigFile >> "VirtualItems" >> _x select 0 >> "displayName"))) + " ";
      } count _oldItem;
      
      {
          _text2 = _text2 + (localize (getText(missionConfigFile >> "VirtualItems" >> _x select 0 >> "displayName"))) + " ";
      } count _newItem;
      
      hint format["%1wurde zu %2verarbeitet.", _text1, _text2];
      Alles anzeigen

      Habs jetzt nur mal eben hin geklatscht wie es ungefähr aussehen könnte - ob es funktioniert will ich nicht versprechen. (Das Leerzeichen hinter %1 und %2 ist bewusst nicht gesetzt, da die Texte hier ein Leerzeichen zur Trennung hinten dran bekommen.)

      Wenn es nicht geht dann ersetze mal count durch forEach. Und vergiss nicht die Variablen bei private[] mit ein zu tragen.

      Arma3 Mod Developer / Scripter

      http://steamcommunity.com/id/nocnico/myworkshopfiles/

    • SpongebobUndPatrick
      Frischling
      Reaktionen
      1
      Trophäen
      10
      Beiträge
      15
      • 6. August 2017 um 19:38
      • #14

      Super funktioniert soweit, nur das da statt normal Kupfererz: "$Kupfererz" steht.

      Außerdem ist ein neuer Error hinzugekommen:

      Spoiler anzeigen
      Code
      private ["_oldItem"];
      _oldItem = _itemInfo select 0;
      
      {
      [false,(_x select>
      19:33:48   Error position: <_itemInfo select 0;
      
      {
      [false,(_x select>
      19:33:48   Error Nicht definierte Variable in Ausdruck: _iteminfo
      19:33:48 File core\actions\fn_processAction.sqf [life_fnc_processAction], line 159
      Alles anzeigen

      obwohl die _iteminfo im private[] ist und auch definiert ist.

    • nocnico
      Anfänger
      Reaktionen
      8
      Trophäen
      10
      Beiträge
      45
      • 6. August 2017 um 20:18
      • #15

      Schick mal bitte kurz die gesamte Datei.

      Arma3 Mod Developer / Scripter

      http://steamcommunity.com/id/nocnico/myworkshopfiles/

    • SpongebobUndPatrick
      Frischling
      Reaktionen
      1
      Trophäen
      10
      Beiträge
      15
      • 6. August 2017 um 20:53
      • #16
      Spoiler anzeigen
      Code: fn_processAction.sqf
      #include "..\..\script_macros.hpp"
      /*
          File: fn_processAction.sqf
          Author: Bryan "Tonic" Boardwine
          Modified : NiiRoZz
      
          Description:
          Master handling for processing an item.
          NiiRoZz : Added multiprocess
      */
      private["_text1","_text2","_vendor","_type","_itemInfo","_oldItem","_newItemWeight","_newItem","_oldItemWeight","_cost","_upp","_hasLicense","_itemName","_oldVal","_ui","_progress","_pgText","_cP","_materialsRequired","_materialsGiven","_noLicenseCost","_text","_filter","_totalConversions","_minimumConversions"];
      _vendor = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
      _type = [_this,3,"",[""]] call BIS_fnc_param;
      //Error check
      if (isNull _vendor || _type isEqualTo "" || (player distance _vendor > 10)) exitWith {};
      life_action_inUse = true;//Lock out other actions during processing.
      
      if (isClass (missionConfigFile >> "ProcessAction" >> _type)) then {
          _filter = false;
          _materialsRequired = M_CONFIG(getArray,"ProcessAction",_type,"MaterialsReq");
          _materialsGiven = M_CONFIG(getArray,"ProcessAction",_type,"MaterialsGive");
          _noLicenseCost = M_CONFIG(getNumber,"ProcessAction",_type,"NoLicenseCost");
          _text = M_CONFIG(getText,"ProcessAction",_type,"Text");
      } else {_filter = true;};
      
      if (_filter) exitWith {life_action_inUse = false;};
      
      _itemInfo = [_materialsRequired,_materialsGiven,_noLicenseCost,(localize format["%1",_text])];
      if (count _itemInfo isEqualTo 0) exitWith {life_action_inUse = false;};
      
      //Setup vars.
      _oldItem = _itemInfo select 0;
      _newItem = _itemInfo select 1;
      _cost = _itemInfo select 2;
      _upp = _itemInfo select 3;
      _exit = false;
      if (count _oldItem isEqualTo 0) exitWith {life_action_inUse = false;};
      
      _totalConversions = [];
      {
          _var = ITEM_VALUE(_x select 0);
          if (_var isEqualTo 0) exitWith {_exit = true;};
          if (_var < (_x select 1)) exitWith {_exit = true;};
          _totalConversions pushBack (floor (_var/(_x select 1)));
      } forEach _oldItem;
      
      if (_exit) exitWith {life_is_processing = false; hint localize "STR_NOTF_NotEnoughItemProcess"; life_action_inUse = false;};
      
      if (_vendor in [mari_processor,coke_processor,heroin_processor]) then {
          _hasLicense = true;
      } else {
          _hasLicense = LICENSE_VALUE(_type,"civ");
      };
      
      _cost = _cost * (count _oldItem);
      private ["_oldItem"];
      _oldItem = _itemInfo select 0;
      
      _minimumConversions = _totalConversions call BIS_fnc_lowestNum;
      _oldItemWeight = 0;
      {
          _weight = ([_x select 0] call life_fnc_itemWeight) * (_x select 1);
          _oldItemWeight = _oldItemWeight + _weight;
      } count _oldItem;
      
      _newItemWeight = 0;
      {
          _weight = ([_x select 0] call life_fnc_itemWeight) * (_x select 1);
          _newItemWeight = _newItemWeight + _weight;
      } count _newItem;
      
      _exit = false;
      
      if (_newItemWeight > _oldItemWeight) then {
          _netChange = _newItemWeight - _oldItemWeight;
          _freeSpace = life_maxWeight - life_carryWeight;
          if (_freeSpace < _netChange) exitWith {_exit = true;};
          _minimumConversions = floor(_freeSpace / _netChange);
      };
      
      if (_exit) exitWith {hint localize "STR_Process_Weight"; life_is_processing = false; life_action_inUse = false;};
      
      /*Setup our progress bar.
      disableSerialization;
      5 cutRsc ["life_progress","PLAIN"];
      _ui = uiNamespace getVariable "life_progress";
      _progress = _ui displayCtrl 38201;
      _pgText = _ui displayCtrl 38202;
      _pgText ctrlSetText format["%2 (1%1)...","%",_upp];
      _progress progressSetPosition 0.01;
      _cP = 0.01;*/
      
      _text1 = "";
      _text2 = "";
      {
       _text1 = _text1 + (localize (getText(missionConfigFile >> "VirtualItems" >> _x select 0 >> "displayName"))) + " ";
      } count _oldItem;
      {
       _text2 = _text2 + (localize (getText(missionConfigFile >> "VirtualItems" >> _x select 0 >> "displayName"))) + " ";
      } count _newItem;
      
      fertigmitLizenz = {
          private ["_oldItem"];
          _oldItem = _itemInfo select 0;
          
          {
              [false,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv;
          } count _oldItem;
      
          {
              [true,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv;
          } count _newItem;
      
          if (_minimumConversions isEqualTo (_totalConversions call BIS_fnc_lowestNum)) then {[format[localize "STR_NOTF_ProcessedItems", _text1, _text2],"Verarbeitung","green",false] call MSG_fnc_handle;} else {/*nicht genug platz - weniger items*/[format[localize "STR_NOTF_ProcessedItems", _text1, _text2],"Verarbeitung","orange",false] call MSG_fnc_handle;};
          life_is_processing = false;
          life_action_inUse = false;
      };
      
      fertigohneLizenz = {
          private ["_oldItem"];
          _oldItem = _itemInfo select 0;
          if (CASH < _cost) exitWith {hint format[localize "STR_Process_License",[_cost] call life_fnc_numberText]; 5 cutText ["","PLAIN"]; life_is_processing = false; life_action_inUse = false;};
          {
              [false,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv;
          } count _oldItem;
      
          {
              [true,(_x select 0),((_x select 1)*(_minimumConversions))] call life_fnc_handleInv;
          } count _newItem;
      
          //5 cutText ["","PLAIN"];
          if (_minimumConversions isEqualTo (_totalConversions call BIS_fnc_lowestNum)) then {hint localize "STR_NOTF_ItemProcess";} else {hint localize "STR_Process_Partial";};
          CASH = CASH - _cost;
          [format[localize "STR_NOTF_ProcessedItems", _text1, _text2],"Verarbeitung","green",false] call MSG_fnc_handle;
          life_is_processing = false;
          life_action_inUse = false;
      };
          
      life_is_processing = true;
      
      if (_hasLicense) then {
          [60,[], 
              {_this call fertigmitLizenz},
              {[localize "STR_NOTF_AbortProcess","Verarbeitung","red",false] remoteExec ["MSG_fnc_handle",player]; life_is_processing = false; life_action_inUse = false;},
              format[localize "STR_NOTF_Process",_text1],{},["",0]
          ] spawn rl_fnc_progressBar;
      } else {
          if (CASH < _cost) exitWith {hint format[localize "STR_Process_License",[_cost] call life_fnc_numberText]; 5 cutText ["","PLAIN"]; life_is_processing = false; life_action_inUse = false;};
          [90,[], 
              {_this call fertigohneLizenz},
              {[localize "STR_NOTF_AbortProcess","Verarbeitung","red",false] remoteExec ["MSG_fnc_handle",player]; life_is_processing = false; life_action_inUse = false;},
              format[localize "STR_NOTF_Process",_text1],{},["",0]
          ] spawn rl_fnc_progressBar;
      };
      Alles anzeigen
    • nocnico
      Anfänger
      Reaktionen
      8
      Trophäen
      10
      Beiträge
      45
      • 6. August 2017 um 21:36
      • #17
      C
      private ["_oldItem"];
       _oldItem = _itemInfo select 0;

      Zeile 103 - 104

      Ebenfalls in 56 - 57 | 120 - 121

      Was soll das da? Ist doch schon definiert worden.

      Arma3 Mod Developer / Scripter

      http://steamcommunity.com/id/nocnico/myworkshopfiles/

    Registrieren oder Einloggen

    Du bist noch kein Mitglied von NodeZone.net? Registriere dich kostenlos und werde Teil einer großartigen Community!

    Registrieren

    Ähnliche Themen

    • [Tutorial] Statusbar / Infoleiste

      • Xylometachlorid
      • 20. Oktober 2015 um 14:33
      • Tutorials & Releases

    Benutzer online in diesem Thema

    • 1 Besucher

    Wichtige Links & Informationen

    Server & Hosting-Ressourcen

      Server Administration & Hosting Basics

      Windows Server Support & Guides

      Linux Server Configuration & Help

      Setting up TeamSpeak 3 & VoIP Servers

      Domains & Web Hosting for Beginners & Professionals

      Cloud Hosting, Docker & Kubernetes Tutorials

    Gameserver & Modding-Ressourcen

      ArmA 3 Tutorials & Script Collection

      Renting & Operating Gameservers

      DayZ Server Management & Help

      FiveM (GTA V) Server & Script Development

      Rust Server Modding & Administration

      Setting up & Optimizing ARK Survival Servers

    NodeZone.net – Deine Community für Gameserver, Server-Hosting & Modding

      NodeZone.net ist dein Forum für Gameserver-Hosting, Rootserver, vServer, Webhosting und Modding. Seit 2015 bietet unsere Community eine zentrale Anlaufstelle für Server-Admins, Gamer und Technikbegeisterte, die sich über Server-Management, Hosting-Lösungen und Spielemodding austauschen möchten.


      Ob Anleitungen für eigene Gameserver, Hilfe bei Root- und vServer-Konfigurationen oder Tipps zu Modding & Scripting – bei uns findest du fundiertes Wissen und praxisnahe Tutorials. Mit einer stetig wachsenden Community findest du hier Antworten auf deine Fragen, Projektpartner und Gleichgesinnte für deine Gaming- und Serverprojekte. Schließe dich NodeZone.net an und werde Teil einer aktiven Community rund um Server-Hosting, Gameserver-Management und Modding-Ressourcen.

    Wer jetzt nicht teilt ist selber Schuld:
    1. Nutzungsbestimmungen
    2. Datenschutzerklärung
    3. Impressum
    4. Urheberrechts- oder Lizenzverstoß melden
  • Trimax Design coded & layout by Gino Zantarelli 2023-2025©
    Community-Software: WoltLab Suite™