Phyrstorm
Member-
Content Count
4 -
Joined
-
Last visited
-
Medals
-
Medals
-
Community Reputation
10 GoodAbout Phyrstorm
-
Rank
Rookie
-
Random Building placer
Phyrstorm replied to Phyrstorm's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Just for anyones refrence I was overthinking the code and got it working finally after working with someone on opendayz.net. /* Random Building Spawn for Chernarus - By Phyrstorm Usage [building,coords,dir] Building is the Building class name Position are the coords from your custom mission file direction is the setDir from your mission file */ private ["_building","_position","_dir","_count","_buildarray"]; if (!isServer) exitWith {}; _building = []; _coords = []; _dir = []; _count = 3; //_buildarray usage [building,position,dir] _buildarray = [ ["Land_Mil_Barracks_i",[3363.9216, 2167.3716, 2.3841858e-006],-132.08899], ["Land_Mil_Barracks_i",[3370.8013, 2173.6431, 6.1988831e-006],-132.08899], ["Land_Mil_Barracks_i",[3377.9146, 2180.3911, 9.5367432e-007],-132.08899], ["Land_Mil_Barracks_i",[3385.0901, 2186.7957, 6.6757202e-006],-132.08899], ["Land_Mil_Barracks_i",[3392.9038, 2194.2275, 6.1988831e-006],-132.08899], ["Land_Mil_Barracks_i",[3400.0671, 2200.752, 4.2915344e-006],-132.08899] ]; for "_x" from 1 to _count do { _randcount = floor (random (count _buildarray)); //diag_log format ["%1",_randcount]; _buildrand = _buildarray select _randcount; //diag_log format ["%1",_buildrand]; _building = _buildrand select 0; //diag_log format ["%1",_building]; _position = _buildrand select 1; //diag_log format ["%1",_position]; _dir = _buildrand select 2; //diag_log format ["%1",_dir]; _buildarray set [_randcount,-1]; //diag_log format ["%1",_buildarray]; _buildarray = _buildarray - [-1]; //diag_log format ["%1",_buildarray]; _vehicle_1 = objNull; if (true) then { _this = createVehicle [_building, _position, [], 0, "CAN_COLLIDE"]; _vehicle_1 = _this; _this setDir _dir; _this setPos _position; }; diag_log text format ["%1 spawned at %2 facing %3.",_building,_position,_dir]; }; -
I am working on a random barracks placer for Dayz and I have most of the code working but when I run it on my test server I get a "Cannot create non-ai vehicle "Land_Mil_Barracks_i"" error in my RPT file. With the diag_log lines I have in the the script for debugging I can see in the RPT file that all of the variables are getting pulled from the array the way I want them to but the createVehicle array seems not to want to use them. the array is setup just like it is in the mission.sqf file from the editor and they will spawn in from that file without issue. Below Is the code I put together and the section from the RPT file pertaining to the buildings trying to be spawned in. The sqf code. /* Random Building Spawn for Chernarus - By Phyrstorm Usage [building,coords,dir] Building is the Building class name Coords are the coords from your custom mission file direction is the setDir from your mission file */ private ["_building","_coords","_dir","_count","_buildarray"]; if (!isServer) exitWith {}; _building = "Land_Mil_Barracks_i"; _coords = [3363.9216, 2167.3716, 2.3841858e-006]; _dir = -132.08899; _count = 3; //_buildarray usage [building,coords,dir] _buildarray = [ ["""Land_Mil_Barracks_i""","[3363.9216, 2167.3716, 2.3841858e-006]","-132.08899"], ["""Land_Mil_Barracks_i""","[3370.8013, 2173.6431, 6.1988831e-006]","-132.08899"], ["""Land_Mil_Barracks_i""","[3377.9146, 2180.3911, 9.5367432e-007]","-132.08899"], ["""Land_Mil_Barracks_i""","[3385.0901, 2186.7957, 6.6757202e-006]","-132.08899"], ["""Land_Mil_Barracks_i""","[3392.9038, 2194.2275, 6.1988831e-006]","-132.08899"], ["""Land_Mil_Barracks_i""","[3400.0671, 2200.752, 4.2915344e-006]","-132.08899"] ]; for "_x" from 1 to _count do { _randcount = floor (random (count _buildarray)); diag_log format ["%1",_randcount]; _buildrand = _buildarray select _randcount; diag_log format ["%1",_buildrand]; _building = _buildrand select 0; diag_log format ["%1",_building]; _coords = _buildrand select 1; diag_log format ["%1",_coords]; _dirs = _buildrand select 2; diag_log format ["%1",_dirs]; _dir = parseNumber _dirs; diag_log format ["%1",_dir]; _buildarray set [_randcount,-1]; diag_log format ["%1",_buildarray]; _buildarray = _buildarray - [-1]; diag_log format ["%1",_buildarray]; _vehicle_1 = objNull; if (true) then { _this = createVehicle [_building, getMarkerPos _coords, [], 0, "CAN_COLLIDE"]; _vehicle_1 = _this; _this setDir _dir; _this setPos getMarkerPos _coords; }; diag_log format ["%1, %2, %3, %4, %5",_buildrand,_buildarray,_building,_coords,_dir]; diag_log text format ["%1 spawned at %2 facing %3.",_building,_coords,_dir]; }; The RPT file. 11:46:36 "3" 11:46:36 "[""Land_Mil_Barracks_i"","[3385.0901, 2186.7957, 6.6757202e-006]","-132.08899"]" 11:46:36 ""Land_Mil_Barracks_i"" 11:46:36 "[3385.0901, 2186.7957, 6.6757202e-006]" 11:46:36 "-132.08899" 11:46:36 "-132.089" 11:46:36 "[[""Land_Mil_Barracks_i"","[3363.9216, 2167.3716, 2.3841858e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3370.8013, 2173.6431, 6.1988831e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3377.9146, 2180.3911, 9.5367432e-007]","-132.08899"],-1,[""Land_Mil_Barracks_i"","[3392.9038, 2194.2275, 6.1988831e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3400.0671, 2200.752, 4.2915344e-006]","-132.08899"]]" 11:46:36 "[[""Land_Mil_Barracks_i"","[3363.9216, 2167.3716, 2.3841858e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3370.8013, 2173.6431, 6.1988831e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3377.9146, 2180.3911, 9.5367432e-007]","-132.08899"],[""Land_Mil_Barracks_i"","[3392.9038, 2194.2275, 6.1988831e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3400.0671, 2200.752, 4.2915344e-006]","-132.08899"]]" 11:46:36 Cannot create non-ai vehicle "Land_Mil_Barracks_i", 11:46:36 "[""Land_Mil_Barracks_i"","[3385.0901, 2186.7957, 6.6757202e-006]","-132.08899"], [[""Land_Mil_Barracks_i"","[3363.9216, 2167.3716, 2.3841858e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3370.8013, 2173.6431, 6.1988831e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3377.9146, 2180.3911, 9.5367432e-007]","-132.08899"],[""Land_Mil_Barracks_i"","[3392.9038, 2194.2275, 6.1988831e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3400.0671, 2200.752, 4.2915344e-006]","-132.08899"]], "Land_Mil_Barracks_i", [3385.0901, 2186.7957, 6.6757202e-006], -132.089" 11:46:36 "Land_Mil_Barracks_i" spawned at [3385.0901, 2186.7957, 6.6757202e-006] facing -132.089. 11:46:36 "2" 11:46:36 "[""Land_Mil_Barracks_i"","[3377.9146, 2180.3911, 9.5367432e-007]","-132.08899"]" 11:46:36 ""Land_Mil_Barracks_i"" 11:46:36 "[3377.9146, 2180.3911, 9.5367432e-007]" 11:46:36 "-132.08899" 11:46:36 "-132.089" 11:46:36 "[[""Land_Mil_Barracks_i"","[3363.9216, 2167.3716, 2.3841858e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3370.8013, 2173.6431, 6.1988831e-006]","-132.08899"],-1,[""Land_Mil_Barracks_i"","[3392.9038, 2194.2275, 6.1988831e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3400.0671, 2200.752, 4.2915344e-006]","-132.08899"]]" 11:46:36 "[[""Land_Mil_Barracks_i"","[3363.9216, 2167.3716, 2.3841858e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3370.8013, 2173.6431, 6.1988831e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3392.9038, 2194.2275, 6.1988831e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3400.0671, 2200.752, 4.2915344e-006]","-132.08899"]]" 11:46:36 Cannot create non-ai vehicle "Land_Mil_Barracks_i", 11:46:36 "[""Land_Mil_Barracks_i"","[3377.9146, 2180.3911, 9.5367432e-007]","-132.08899"], [[""Land_Mil_Barracks_i"","[3363.9216, 2167.3716, 2.3841858e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3370.8013, 2173.6431, 6.1988831e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3392.9038, 2194.2275, 6.1988831e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3400.0671, 2200.752, 4.2915344e-006]","-132.08899"]], "Land_Mil_Barracks_i", [3377.9146, 2180.3911, 9.5367432e-007], -132.089" 11:46:36 "Land_Mil_Barracks_i" spawned at [3377.9146, 2180.3911, 9.5367432e-007] facing -132.089. 11:46:36 "2" 11:46:36 "[""Land_Mil_Barracks_i"","[3392.9038, 2194.2275, 6.1988831e-006]","-132.08899"]" 11:46:36 ""Land_Mil_Barracks_i"" 11:46:36 "[3392.9038, 2194.2275, 6.1988831e-006]" 11:46:36 "-132.08899" 11:46:36 "-132.089" 11:46:36 "[[""Land_Mil_Barracks_i"","[3363.9216, 2167.3716, 2.3841858e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3370.8013, 2173.6431, 6.1988831e-006]","-132.08899"],-1,[""Land_Mil_Barracks_i"","[3400.0671, 2200.752, 4.2915344e-006]","-132.08899"]]" 11:46:36 "[[""Land_Mil_Barracks_i"","[3363.9216, 2167.3716, 2.3841858e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3370.8013, 2173.6431, 6.1988831e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3400.0671, 2200.752, 4.2915344e-006]","-132.08899"]]" 11:46:36 Cannot create non-ai vehicle "Land_Mil_Barracks_i", 11:46:36 "[""Land_Mil_Barracks_i"","[3392.9038, 2194.2275, 6.1988831e-006]","-132.08899"], [[""Land_Mil_Barracks_i"","[3363.9216, 2167.3716, 2.3841858e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3370.8013, 2173.6431, 6.1988831e-006]","-132.08899"],[""Land_Mil_Barracks_i"","[3400.0671, 2200.752, 4.2915344e-006]","-132.08899"]], "Land_Mil_Barracks_i", [3392.9038, 2194.2275, 6.1988831e-006], -132.089" 11:46:36 "Land_Mil_Barracks_i" spawned at [3392.9038, 2194.2275, 6.1988831e-006] facing -132.089.
-
B.E.C. "Battleye Extended Controls" - Admin Tool
Phyrstorm replied to nuxil's topic in ARMA 2 & OA - Servers & Administration
Well I'm definitely running on windows and it is an ARMA 2 CO server which is up and running with BE and RCON enabled as I am looking at it through an RCON tool from my desktop right now. I have the C++ 2008 redist installed, which I didn't previously (before this error) and it gave something about a VC90 side-by-side error. This is some sort of python error that I suspect has to do with running on Windows Server 2008 R2, because it is running in an Hyper V VPS, or because this is all being run over remote desktop. EDIT: I found I had a copy of 1.58 sitting in my download directory. I copied that over to a new directory on the server and it works fine so there is some change between 1.58 and 1.592 that appears to be causing the error. -
B.E.C. "Battleye Extended Controls" - Admin Tool
Phyrstorm replied to nuxil's topic in ARMA 2 & OA - Servers & Administration
I am getting a python error when trying to start up BEC on my new dedicated server. C:\BEC>bec.exe -f config.cfg Traceback (most recent call last): File "Bec.py", line 4341, in <module> File "Bec.py", line 4336, in Main File "Bec.py", line 4330, in startReactor File "Bec.py", line 2820, in __init__ File "Bec.py", line 493, in __init__ AttributeError: 'bool' object has no attribute 'split' Here is the most basic config.cfg file I put together when trying to get it going for the first time. [bec] Ip = 127.0.0.1 Port = 2302 BePath = C:\epoch_server\instance_11_Chernarus\BattlEye Admins = Admins.xml Commands = Commands.xml I moved all the included plugin directories from the from the plugins folder thinking that might have been the issue but still no luck. I'm running on a Hyper-V server Running Windows Server 2008 Standard R2. Anyone have any ideas?
