Search the Community
Showing results for tags 'cfgpatches'.
Found 4 results
-
cfgpatches I'm having problems with "Member already defined"
evagreenstatas posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Hey all, I'm rather new to Arma 3 editing and the whole pbo editing kind of thing and I am hopelessly lost in how to resolve an error in a faction I'm creating using the Alive Orbat. I'm sorry if I'm posting all of this in the wrong place and I hope I'm forgiven if I am. The issue I seem to be having is a 'member already defined' error code, specifically ' File test/CfgPatches.hpp, line 1729: /CfgVehicles.B_USAForceRecon_Rifleman_Anti_Tank_Woodland_01: Member already defined.' Again, I'm hopelessly lost in how to resolve this and this if probably my 4th time trying to rebuild the faction, which is all Infantry. Any help would be great and any additional information I can get or provide will be immensely useful. -
Iv had this problem for months when using the ORBAT. I keep getting the same error when i try to run the game with the exported faction in the add on section, its extremely frustrating as these factions take nearly 3 days to create, iv had to delete them then remake them multiple times. Could someone please help me as i want to make a RMC faction, RAF, RAF regiment RN and so on. Asked this question on the ALIVE forum months ago and no one has replied , posted it on reddit and no one replied either, I even uninstalled and reinstalled ARMA twice hopefully someone here could help me out or redo it for me. (sorry for the crap quality) sorry for sounding so petty. Let me know if i should send you the folder or config etc. Please help https://ibb.co/0BG6Lcc https://ibb.co/rpSWxFn
-
Obviously based on my question my Arma scripting experience is limited. I have other coding experience but the Arma nuances make it difficult for me to find out where I am going wrong. I have done a bunch of research and I have found examples of what I want but none are working. If anyone has suggestions it would be very helpful. What I would like to do is step through the players cfgpatches and check to see if each element of that array is in another array or not. If not display text and endmission. I know this question has been asked but in each thread the examples do not work as expected. Below are the three methods I have tried to get what I want done to work. First attempt mods = ["Element1","Element2","Element3"]; _classes = []; _cfg = (ConfigFile >> "CfgPatches"); _itemCount = (count _cfg) - 1; for "_i" from 0 to _itemCount do { if (isClass (_cfg select _i)) then { _classes = _classes + [configName (_cfg select _i)]; }; }; if (!( str _classes in mods)) then { player groupChat "You are using a mod that is not allowed, please check list of approved mods. you are being returned to the lobby in 15 seconds"; sleep 15; "end1" call BIS_fnc_endMission; }; Second Attempt _mods = ["Element1","Element2","Element3"]; _patches = (ConfigFile >> "CfgPatches"); _c = count _patches; _loop = true; _n = 0; _arr []; while{_loop}do{ _cur = _patches select _n; if not(_cur in _mods) { player groupChat "You are using a mod that is not allowed, please check list of approved mods. you are being returned to the lobby in 15 seconds"; sleep 15; "end1" call BIS_fnc_endMission; }; _n = _n + 1; if(_n > _c)then{_loop = false;}; }; _arr; Third Attempt _mods = ["Element1","Element2","Element3"]; _canPass = true; { if (!(["a3_", _x] call BIS_fnc_inString)) then { if (isClass _x) then { if ((!configName _x) in _mods) exitWith {_canPass = false;}; }; }; } forEach activatedAddons; if (!_canPass) exitWith { player groupChat "You are using a mod that is not allowed, please check list of approved mods. you are being returned to the lobby in 15 seconds"; sleep 15; "end1" call BIS_fnc_endMission; }; Any suggestions on how I might get one of these are similar code to work would be a big help, Thanks in advanced.
- 8 replies
-
- array
- cfgpatches
-
(and 2 more)
Tagged with:
-
Hi. How can I patch a mod? To be more specific, here's what I want to do: Let's say I have a mod identified by: class CfgPatches { class My_mod { units[] = { }; weapons[] = { }; requiredAddons[] = {"CBA_Extended_EventHandlers"}; version = "0.993"; versionStr = "0.993"; versionDesc= "My mod"; versionAr[] = {1,0,0}; author[] = {"Me"}; }; }; All scripts are in the main mod folder (for example, \My_mod\...) Now I want to patch this mod by altering some scripts and adding a few more scripts to the mod folder. Is it possible to use the same class for this patch as well (i.e My_mod)? Should I change the name of the patch folder? ( \My_mod\ ) Should the script I want to "patch" (i.e fix) have the same name as the script in the original mod? I'd appreciate any help with this.