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
Fr: 23 Mai 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
    6. Archiv

    Findet den Fehler bin Ratlos

    • chris89
    • 13. Mai 2016 um 03:10
    • Geschlossen
    • chris89
      Schüler
      Reaktionen
      15
      Trophäen
      10
      Beiträge
      108
      • 13. Mai 2016 um 03:10
      • #1

      Moin zusammen ich bin Ratlos sehe den fehler nicht.

      Laut RTP wird das ; vermisst aber ich kann nicht erkennen wo XD

      vllt habt ihr bessere augen.


      Code
      2016/05/13,  2:42:35 Error in expression <w item(s) are not added"];	};	
      
      
      
      
      
      
      
      output _formatedProcessingInfo = "Du hast";	
      fo>
      2016/05/13,  2:42:35   Error position: <_formatedProcessingInfo = "Du hast";	
      fo>
      2016/05/13,  2:42:35   Error Missing ;
      2016/05/13,  2:42:35 File mpmissions\fallujah.fallujah\core\actions\fn_processMulitpleItems.sqf, line 99
      2016/05/13,  2:42:35 Error in expression <w item(s) are not added"];	};	
      
      
      
      
      
      
      
      output _formatedProcessingInfo = "Du hast";	
      fo>
      2016/05/13,  2:42:35   Error position: <_formatedProcessingInfo = "Du hast";	
      fo>
      2016/05/13,  2:42:35   Error Missing ;
      2016/05/13,  2:42:35 File mpmissions\fallujah.fallujah\core\actions\fn_processMulitpleItems.sqf, line 99
      Alles anzeigen
      PHP: Script
      /*
      author: preller @ freudenhaus <[email protected]> 
      for Freudenhaus Altis Life** processMulitpleItems.sqf* 
      processes any number of input items into one output item. 
      progress bar is from bryan "tonic" boardwines fn_processAction.sqf.** 
      Please feel free to use and modify it, but remember to credit the author.** 
      PARAMS:* _this select 3: String - processor type*
      */
      
      
      
      
      private ["_inputItems", "_outputItem", "_inputItemsNeeded", "_outputItemAmount", "_itemsInv", "_itemsNeeded", "_inputItemsDeleted", "_ui", "_progress", "_pgText", "_cP", "_productionAmount", "_possibleProductionAmount","_processor","_formatedProcessingInfo","_hasLicense","_licenseNeeded","_processingCost","_type","_productionInfo"];
      if (isServer) exitWith {};if (life_is_processing) exitWith {hint "Der Kollege ist beschäftigt. Bitte nicht stressen!";};    
      
      
      
      
      //parameter
      _processor = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;_type = [_this,3,"",[""]] call BIS_fnc_param;
      
      
      
      
      //Error check. taken from tonic.
      if(isNull _processor OR _type == "" OR (player distance _processor > 5)) exitWith {};if(vehicle player != player) exitwith {hint format["Du darfst nicht im Fahrzeug sitzen"];};
      life_is_processing = true;
      
      
      
      
      //define your production line 
      here_productionInfo = switch (_type) do{	
      		case "test1": {[["daddeln","apple"],[1,1],"peach",1,"",0];};	
      		default {[]};};
      
      //initialize
      _inputItems = _productionInfo select 0;
      _inputItemsNeeded = _productionInfo select 1;
      _outputItem = _productionInfo select 2;
      _outputItemAmount = [(_productionInfo select 3),0,0,[0]] call BIS_fnc_param;
      _licenseNeeded = _productionInfo select 4;
      _processingCost = [(_productionInfo select 5),0,0,[0]] call BIS_fnc_param;
      _hasLicense = missionNamespace getVariable (([_licenseNeeded,0] call life_fnc_licenseType) select 0);
      _inputItemsDeleted = true;_productionAmount = 9999; 
      
      
      
      
      //infiniteif 
      ((count _inputItems) != (count _inputItemsNeeded)) exitWith 	{diag_log format["ERROR: ProcessMultipleItems falsch initialisiert: Anzahl InputItems ungleich Anzahl InputItem Kosten"];
      life_is_processing = false;};
      
      
      
      
      //check if the player has enough items and determine how much he can producefor 
      "_x" from 0 to ((count _inputItems) - 1) do {	
      
      
      
      
      //get current amount player has	
      _itemsInv = missionNamespace getVariable ([(_inputItems select _x),0] call life_fnc_varHandle);	
      _itemsNeeded = _inputItemsNeeded select _x;	
      
      
      
      
      //calculate possible amount of processing cycles	
      _possibleProductionAmount = floor (_itemsInv / _itemsNeeded);	
      if (_possibleProductionAmount < _productionAmount) then {		_productionAmount = _possibleProductionAmount;	};};
      
      
      
      
      //exit if the player doenst have the required items for one processif 
      (_productionAmount < 1) exitWith {	hint "Du hast nicht genug Materialien dabei";	
      life_is_processing = false;};
      
      
      
      
      //check for cash if the player doesnt have the license and calculate possible max productionif 
      (!_hasLicense) then {	
      
      
      
      
      //determine max production by money	
      if ((floor (life_cash / _processingCost)) < _productionAmount) then {		_productionAmount = floor (life_cash / _processingCost);	};};
      
      
      
      
      //exit if the player doenst have the required money for one processif 
      (_productionAmount < 1) exitWith {	hint "Du hast nicht genug Geld dabei";	life_is_processing = false;};
      
      
      
      
      //Setup our progress bar. taken from tonic.
      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)...","%","Bei der Herstellung."];
      _progress progressSetPosition 0.01;
      _cP = 0.01;	
      
      
      
      
      //progress bar.
      while{true} do{	
      sleep  0.3;
      _cP = _cP + 0.01;	
      _progress progressSetPosition _cP;	
      _pgText ctrlSetText format["%3 (%1%2)...",round(_cP * 100),"%","Bei der Herstellung."];	
      if(_cP >= 1) exitWith {};
      if(player distance _processor > 10) exitWith {};};
      if(player distance _processor > 10) exitWith {hint "Du hast dich zu weit entfernt! Bleib dichter dran"; 
      5 cutText ["","PLAIN"]; 
      life_is_processing = false;};
      
      
      
      
      //substract items for 
      "_x" from 0 to ((count _inputItems) - 1) do {	
      
      
      
      
      //reduce 	
      if (!([false,(_inputItems select _x),((_inputItemsNeeded select _x) * _productionAmount)] call life_fnc_handleInv)) then {		_inputItemsDeleted = false;	}};
      
      
      
      
      //add new items if players items where deleted
      if (_inputItemsDeleted) then {	if (!_hasLicense) then {		life_cash = life_cash - (_processingCost * _productionAmount);	};	
      
      
      
      
      //add the new item	
      if (!([true,_outputItem,(_outputItemAmount * _productionAmount)] call life_fnc_handleInv)) then {		hint format["Ups. Beim produzieren ist was schiefgelaufen. Irgendein Admin ist Schuld! Ich nicht. Gruß preller"];		
      diag_log format["ERROR: fn_processMultipleItems - new item(s) are not added"];	};	
      
      
      
      
      //format 
      output _formatedProcessingInfo = "Du hast";	
      for "_x" from 0 to ((count _inputItems) - 2) do {		
      _formatedProcessingInfo = _formatedProcessingInfo + format[" %1 %2,",((_inputItemsNeeded select _x) * _productionAmount),(_inputItems select _x)];	};	
      _formatedProcessingInfo = _formatedProcessingInfo + format[" und %1 %2 zu %4 %3 verarbeitet",((_inputItemsNeeded select ((count _inputItemsNeeded) - 1)) * _productionAmount),(_inputItems select ((count _inputItems) - 1)),_outputItem,(_outputItemAmount * _productionAmount)];	
      5 cutText ["","PLAIN"];	titleText[format["%1",_formatedProcessingInfo],"PLAIN"];};
      life_is_processing = false;
      Alles anzeigen
    • Xylometachlorid
      Nerd
      Reaktionen
      402
      Trophäen
      11
      Beiträge
      584
      • 13. Mai 2016 um 08:04
      • #2

      Zeile 75. Du hast ein verschachteltes if also zwei geöffnete Klammern, machst aber nur eine wieder zu.

      extDB2 Tutorial: extDB2 Einrichten - so geht's richtig

    • SBuserhy
      Kenner
      Reaktionen
      265
      Beiträge
      519
      • 26. Mai 2016 um 01:06
      • #3

      Zeile 36, 51, 55 und 61

      Code
      (_productionAmount < 1) exitWith { hint "Du hast nicht genug Materialien dabei";

      mit einem "IF" am Anfang macht es Sinn ?!? #ungetestet

      Code
      IF (_productionAmount < 1) exitWith { hint "Du hast nicht genug Materialien dabei";


      Zeile 86

      Code
      "_x" from 0 to ((count _inputItems) - 1) do {


      fehlt da nicht ein "for" ?!? #ungetestet

      Code
      for "_x" from 0 to ((count _inputItems) - 1) do {


      Zeile 89:
      if (!([false,(_inputItems select _x),((_inputItemsNeeded select _x) * _productionAmount)] call life_fnc_handleInv)) then { _inputItemsDeleted = false; }};


      if (!([false,(_inputItems select _x),((_inputItemsNeeded select _x) * _productionAmount)] call life_fnc_handleInv)) then { _inputItemsDeleted = false; };}; << ???

      ausprobieren, lernen, weiterentwickeln, verbessern :gamer:

      kein Support per PM | schnelle Fehleranalyse >> RPT log Filter

    • nox 25. März 2023 um 00:47

      Hat das Thema aus dem Forum Hilfeforum - ArmA 3 nach Archiv verschoben.

    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/Selbst-Test] Sollte ich einen Life Server eröffnen ?

      • vabene1111
      • 3. August 2017 um 10:07
      • Tutorials & Releases
    • exDB2 auf Testserver 4.4R3 (selber Root)

      • Michael Moskau
      • 8. Oktober 2016 um 20:55
      • Hilfeforum

    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™