Jump to content

[Release] 2.1 Plot Management - UPDATED Object Counter


Zupa

Recommended Posts

Installed Build Vectors and Snap Pro after Plot Management, now i get this error, someone have an idea?
No Objects counted, maintain didnt work.
 

Error in expression < 
_allowed = [_owner] +  _fuid;   
if ( _playerUID in _allowed && _ownerID in _a>
  Error position: <_playerUID in _allowed && _ownerID in _a>
  Error Undefined variable in expression: _playeruid
File mpmissions\__CUR_MP.Chernarus\dayz_code\fn_selfActions.sqf, line 303
Error in expression < 
_allowed = [_owner] +  _fuid;   
if ( _playerUID in _allowed && _ownerID in _a>
  Error position: <_playerUID in _allowed && _ownerID in _a>
  Error Undefined variable in expression: _playeruid
File mpmissions\__CUR_MP.Chernarus\dayz_code\fn_selfActions.sqf, line 303

fn_selfactions.sqf (codeblock)

		///Allow owners to delete modulars
		if(_isModular && (dayz_characterID == _ownerID)) then {
				if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
					_findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 0];
					_IsNearPlot = count (_findNearestPoles);
					_fuid  = [];
					_allowed = [];
					if(_IsNearPlot > 0)then{
						_thePlot = _findNearestPoles select 0;
						_owner =  _thePlot getVariable ["ownerPUID","010"];
						_friends = _thePlot getVariable ["plotfriends", []];
						{
						  _friendUID = _x select 0;
						  _fuid  =  _fuid  + [_friendUID];
						} forEach _friends;
						_allowed = [_owner];    
						_allowed = [_owner] +  _fuid;   
						if ( _playerUID in _allowed && _ownerID in _allowed ) then {  // // If u want that the object also belongs to someone on the plotpole.
							_player_deleteBuild = true;
						};                  
					}else{
						if(_ownerID == _playerUID)then{
							_player_deleteBuild = true;
						};
					};                                        
				};
		};
Link to comment
Share on other sites

 

Installed Build Vectors and Snap Pro after Plot Management, now i get this error, someone have an idea?

No Objects counted, maintain didnt work.

 

Error in expression < 
_allowed = [_owner] +  _fuid;   
if ( _playerUID in _allowed && _ownerID in _a>
  Error position: <_playerUID in _allowed && _ownerID in _a>
  Error Undefined variable in expression: _playeruid
File mpmissions\__CUR_MP.Chernarus\dayz_code\fn_selfActions.sqf, line 303
Error in expression < 
_allowed = [_owner] +  _fuid;   
if ( _playerUID in _allowed && _ownerID in _a>
  Error position: <_playerUID in _allowed && _ownerID in _a>
  Error Undefined variable in expression: _playeruid
File mpmissions\__CUR_MP.Chernarus\dayz_code\fn_selfActions.sqf, line 303

fn_selfactions.sqf (codeblock)

		///Allow owners to delete modulars
		if(_isModular && (dayz_characterID == _ownerID)) then {
				if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
					_findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 0];
					_IsNearPlot = count (_findNearestPoles);
					_fuid  = [];
					_allowed = [];
					if(_IsNearPlot > 0)then{
						_thePlot = _findNearestPoles select 0;
						_owner =  _thePlot getVariable ["ownerPUID","010"];
						_friends = _thePlot getVariable ["plotfriends", []];
						{
						  _friendUID = _x select 0;
						  _fuid  =  _fuid  + [_friendUID];
						} forEach _friends;
						_allowed = [_owner];    
						_allowed = [_owner] +  _fuid;   
						if ( _playerUID in _allowed && _ownerID in _allowed ) then {  // // If u want that the object also belongs to someone on the plotpole.
							_player_deleteBuild = true;
						};                  
					}else{
						if(_ownerID == _playerUID)then{
							_player_deleteBuild = true;
						};
					};                                        
				};
		};

 

change that block to this but make a backup

 

///Allow owners to delete modulars
if(_isModular) then {
        if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
            _findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 0];
            _IsNearPlot = count (_findNearestPoles);
            _fuid  = [];
            _allowed = [];
            if(_IsNearPlot > 0)then{
                _thePlot = _findNearestPoles select 0;
                _owner =  _thePlot getVariable ["ownerPUID","010"];
                _friends = _thePlot getVariable ["plotfriends", []];
                {
                  _friendUID = _x select 0;
                  _fuid  =  _fuid  + [_friendUID];
                } forEach _friends;
                _allowed = [_owner];    
                _allowed = [_owner] +  _fuid;   
                if ( _playerUID in _allowed && _ownerID in _allowed ) then {  
                    _player_deleteBuild = true;
                };                  
            }else{
                if(_ownerID == _playerUID)then{
                    _player_deleteBuild = true;
                };
            };                                        
        };
};
Link to comment
Share on other sites

Hey Zupa, when you install P4L the player_build is taken by modular_build.sqf. I changed it to player_build.sqf and friendly's building on my plot worked. However without the edit's to player_build friendly building will not work. How would you go about making modular_build.sqf work alongside player_build? You can only have one unless there's another way? Can I just copy what's supposed to go into "player_build.sqf" into modular_build?

 

My problem exactly. I know RimBlock has said NOT to use the latest P4L with Zupa's Plot Management but I already have the latest P4L installed :(

 

RimBlock has changed the player_build call in compiles.sqf to call the modular_build.sqf file. 

 

Zupa, what file can we edit to get Plot Management working, or has anyone running P4L 2.4/5 got their Plot Management to work?

Link to comment
Share on other sites

Not wishing to hijack but the modular build files are just the player_build.sqf cut in to smaller chunks and called from modular_build.sqf.  The idea was that if you wanted to change a small bit of the build functionality then you could modify a small 'part' file and then your players only need to download that part and not the whole player_build.sqf.  you should be able to find 95% of the code that was in player_build.sqf in the modular build files.

 

For checking ownership and firendlies player_build_plotCheck.sqf is the most likely place to check.  For A Plot for Life v2.5 I have created a new function that all the building files use for checking ownership and friendlies.  You may be able to just modify that one file and it will fix it for all building files (upgrade / downgrade etc).  No promises as I have not looked at Zupas code though.  The new function file for A Plot for Life v2.5 is fn_check_owner.sqf (in complie sub directory).

Link to comment
Share on other sites

Hi Zupa, 

 

As you have probably read above, we need a fix to enable those of us using P4L 2.4/5 to use your Plot Management script. This is the file that has had the player_build call changed in compiles.sqf, called modular_build.sqf.

//Check if building already in progress, exit if so.
if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_40") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true;

private ["_itemConfig","_classname","_classnametmp","_require","_text","_ghost","_lockable","_requireplot","_isAllowedUnderGround","_offset","_isPole","_isLandFireDZ","_hasRequired","_hasrequireditem","_reason","_buildObject","_location1","_object","_objectHelper","_position","_controls","_cancel","_dir","_vector"];

/*Basic Defines*/
DZE_Q = false;
DZE_Z = false;

DZE_Q_alt = false;
DZE_Z_alt = false;

DZE_Q_ctrl = false;
DZE_Z_ctrl = false;

DZE_5 = false;
DZE_4 = false;
DZE_6 = false;

DZE_F = false;

DZE_cancelBuilding = false;

DZE_updateVec = false;
DZE_memDir = 0;
DZE_memForBack = 0;
DZE_memLeftRight = 0;

call gear_ui_init;
closeDialog 1;

DZE_buildItem = _this; //This is a magazine! It's global to allow access to it from outside functions

//count nearby objects. Returns [_cnt] number
[] call player_build_countNearby;

//Check illegal player states. Returns [_isFine] string
[] call player_build_states;

//check for nearby requirements (campfire, workshop, fueltank).
[] call player_build_needNearby;

//check config files and gather info about item (if using custom buildables, make your own similar function instead).
_itemConfig = [] call player_build_getConfig;

//define items collected from function
_classname = _itemConfig select 0; //string
_classnametmp = _itemConfig select 1; //string
_require = _itemConfig select 2; // array
_text = _itemConfig select 3; // string
_ghost = _itemConfig select 4; //string
_lockable = _itemConfig select 5; //int -- 0/1=No 2=lockbox, 3=combolock, 4=safe
_requireplot = _itemConfig select 6; //int
_isAllowedUnderGround = _itemConfig select 7; //int
_offset = _itemConfig select 8; //array
_isPole = _itemConfig select 9; //bool
_isLandFireDZ = _itemConfig select 10; //bool

//Check for nearby plotpoles. Returns [_IsNearPlot,_nearestPole,_ownerID,_friendlies] [int,Obj,int,array]
[_isPole, _requireplot, _isLandFireDZ] call player_build_plotCheck;

if (DZE_ActionInProgress) then { //needed otherwise _hasRequired gets RPT error

//Check for build requirements (missing tools and items). Returns [_hasrequireditem,_reason] [bool,string]
_hasRequired = [_require, _text, true, true] call player_build_buildReq;

//define item collected from function
_hasrequireditem = _hasRequired select 0; //bool

	if (_hasrequireditem) then {
		
		//Create object that is attached to a player (i.e Ghost preview if available)
		_buildObject = [_classname, _ghost, _offset, true] call player_build_create;
		
		//define items collected from function
		_location1 = _buildObject select 0; //array
		_object = _buildObject select 1; //Obj
		_objectHelper = _buildObject select 2; //Obj
		
		_controls = [_object, _isAllowedUnderGround, _location1, _objectHelper] call player_build_controls;

		//define items collected from function
		_cancel = _controls select 0; //bool
		_reason = _controls select 1; //string
		_position = _controls select 2; //array
		_dir = _controls select 3; //int
		_vector = _controls select 4; //array
		
		//Publish item to a database
		[_cancel, _position, _classnametmp,_isAllowedUnderGround, _text, _isPole, _lockable,_dir, _reason, _vector] call player_build_publish;
	};
};

And this is the paste that was supposed to go into player_build.sqf, which is now called modular_build.sqf

_friendlies = _nearestPole getVariable ["plotfriends",[]];
_fuid  = [];
{
      _friendUID = _x select 0;
      _fuid  =  _fuid  + [_friendUID];
} forEach _friendlies;
_builder  = getPlayerUID player;
// check if friendly to owner
if(_builder in _fuid) then {
    _canBuildOnPlot = true;
};   

Literally everything except friendlies building on plotpoles works in both P4L and Plot Management up to this point. We just need to be able to add that code somehow into that file to finish it all off and enjoy both scripts. Please? :)

 

It has also been suggested that it could maybe go in here? player_build_plotCheck.sqf

if(!DZE_ActionInProgress) exitWith {};
//Check if nearby plotpoles exists
private ["_passArray","_isPole","_needText","_distance","_findNearestPoles","_findNearestPole","_IsNearPlot","_requireplot","_isLandFireDZ","_canBuildOnPlot","_nearestPole","_ownerID","_friendlies", "_playerUID","_plotcheck"];

//defines
_isPole = _this select 0;
_requireplot = _this select 1;
_isLandFireDZ = _this select 2;

_needText = localize "str_epoch_player_246"; //text for when requirements not met
_canBuildOnPlot = false;
_nearestPole = objNull;
_ownerID = 0;
_friendlies = [];

_plotcheck = [player, _isPole] call FNC_find_plots;
_distance = _plotcheck select 0;
_IsNearPlot = _plotcheck select 1;
_nearestPole = _plotcheck select 2;

// If item is plot pole && another one exists within 45m
if(_isPole && _IsNearPlot > 0) exitWith {  DZE_ActionInProgress = false; cutText [(format [localize "str_epoch_player_44", DZE_PlotPole select 1]) , "PLAIN DOWN"]; };

if(_IsNearPlot == 0) then {

	// Allow building of plotpole or items not requiring a plot pole
	if(!(_requireplot) || _isLandFireDZ) then {
		_canBuildOnPlot = true;
	};

} else {
	// Since there are plot poles nearby we need to check ownership && friend status

	_buildcheck = [player, _nearestPole] call FNC_check_owner;
	_isowner = _buildcheck select 0;
	_isfriendly = _buildcheck select 1;
	if ((_isowner) || (_isfriendly)) then {
		_canBuildOnPlot = true;
	};
};

_passArray = [_IsNearPlot,_nearestPole,_ownerID,_friendlies,_distance]; //create new array and pass it to caller

// End script if item is plot pole and another one exists within defined radius
if(_isPole && _IsNearPlot > 0) exitWith { 
	DZE_ActionInProgress = false;
	cutText [(format [localize "str_epoch_player_44", DZE_PlotPole select 1]) , "PLAIN DOWN"];
	_passArray
};

if(!_canBuildOnPlot) exitWith { //end script if requirements were not met
	DZE_ActionInProgress = false;
	cutText [format[(localize "STR_EPOCH_PLAYER_135"),_needText,_distance] , "PLAIN DOWN"];
	_passArray
};
_passArray //[int,Obj,int,array]

Link to comment
Share on other sites

Having some strange issue with PM, I'm assuming the number/300 at the top is the object limit of the plotpole however testing with one wood wall in the plotpole radius it displays 401/300 and then a minute later 11/301... Also when i add myself to the "plotfriends" and then die, i cannot build nor remove the plotpole.

 

I'm also getting this error in the client rpt

 

Error in expression < _x; } count PP_Marks; PP_Marks = nil; sleep 1;


};

if ((isNil "PP_Marks") && (>
Error position: };

if ((isNil "PP_Marks") && (>
Error Generic error in expression
File mpmissions\__CUR_MP.Chernarus\plotManagement\plotToggleMarkers.sqf, line 17
Suspending not allowed in this context
Error in expression < _x; } count PP_Marks; PP_Marks = nil; sleep 1;
};

if ((isNil "PP_Marks") && (>
Error position: };

if ((isNil "PP_Marks") && (>
Error Generic error in expression
File mpmissions\__CUR_MP.Chernarus\plotManagement\plotToggleMarkers.sqf, line 17
Suspending not allowed in this context
Error in expression < _x; } count PP_Marks; PP_Marks = nil; sleep 1;
};

if ((isNil "PP_Marks") && (>
Error position: };

if ((isNil "PP_Marks") && (>
Error Generic error in expression
File mpmissions\__CUR_MP.Chernarus\plotManagement\plotToggleMarkers.sqf, line 17
Suspending not allowed in this context
Error in expression < _x; } count PP_Marks; PP_Marks = nil; sleep 1;
};

if ((isNil "PP_Marks") && (>
Error position: };

if ((isNil "PP_Marks") && (>
Error Generic error in expression
File mpmissions\__CUR_MP.Chernarus\plotManagement\plotToggleMarkers.sqf, line 17

 

Also

 

if ((isPlayer _unit) && !(_charID in _friendlies)) then {


r_action>
Error position: <_charID in _friendlies)) then {
r_action>
Error Undefined variable in expression: _charid
File z\addons\dayz_code\compile\fn_damageActions.sqf, line 178
Error in expression

if(_unconscious) then {
r_action = true;
_a>
Error position: <_unconscious) then {
r_action = true;
_a>
Error Undefined variable in expression: _unconscious
File z\addons\dayz_code\compile\fn_damageActions.sqf, line 106">

 

Any help with this would be much appreciated.

Link to comment
Share on other sites

 

Hi Zupa, 

 

As you have probably read above, we need a fix to enable those of us using P4L 2.4/5 to use your Plot Management script. This is the file that has had the player_build call changed in compiles.sqf, called modular_build.sqf.

 

If you are using A Plot for Life v2.5, based on what you have posted above, then you may be able to change just fn_check_owner.sqf

 

Open the file and replace the contents with

// Check Ownership by RimBlock (http://epochmod.com/forum/index.php?/user/12612-rimblock/)

private ["_player","_object","_playerUID","_ObjectOwner","_owner","_friendlies","_friendly","_return"];

_player = _this select 0;
_Object = _this select 1;
_Owner = false;
_friendly = false;

_playerUID = [_player] call FNC_GetPlayerUID;
_ObjectOwner = _object getVariable ["ownerPUID","0"];

_plotfriends = _Object getVariable ["plotfriends",[]];

{
      _friendlies set [(count _friendlies)],(_x select 0)];
} forEach _plotfriends;

if (_playerUID == _ObjectOwner) then {
	_owner = true;
};

if (_ObjectOwner in _friendlies) then {
	_friendly = true;
};

_return = [_owner, _friendly];
_return

This one change in that one file should work for Player_build, remove, building upgrade and downgrade as they all use this function to check owner and to check friendlies in AP4L v2.5.

 

Note: I have no way of testing the above code just now so there may be a type or ARMA 'feature' that causes an error message.  Give it a test.

 

If this does not error but does not fix it then Zupa will have to take a look.

Link to comment
Share on other sites

Having some strange issue with PM, I'm assuming the number/300 at the top is the object limit of the plotpole however testing with one wood wall in the plotpole radius it displays 401/300 and then a minute later 11/301... Also when i add myself to the "plotfriends" and then die, i cannot build nor remove the plotpole.

 

I'm also getting this error in the client rpt

 

Error in expression < _x; } count PP_Marks; PP_Marks = nil; sleep 1;

};

if ((isNil "PP_Marks") && (>

Error position: };

if ((isNil "PP_Marks") && (>

Error Generic error in expression

File mpmissions\__CUR_MP.Chernarus\plotManagement\plotToggleMarkers.sqf, line 17

Suspending not allowed in this context

Error in expression < _x; } count PP_Marks; PP_Marks = nil; sleep 1;

};

if ((isNil "PP_Marks") && (>

Error position: };

if ((isNil "PP_Marks") && (>

Error Generic error in expression

File mpmissions\__CUR_MP.Chernarus\plotManagement\plotToggleMarkers.sqf, line 17

Suspending not allowed in this context

Error in expression < _x; } count PP_Marks; PP_Marks = nil; sleep 1;

};

if ((isNil "PP_Marks") && (>

Error position: };

if ((isNil "PP_Marks") && (>

Error Generic error in expression

File mpmissions\__CUR_MP.Chernarus\plotManagement\plotToggleMarkers.sqf, line 17

Suspending not allowed in this context

Error in expression < _x; } count PP_Marks; PP_Marks = nil; sleep 1;

};

if ((isNil "PP_Marks") && (>

Error position: };

if ((isNil "PP_Marks") && (>

Error Generic error in expression

File mpmissions\__CUR_MP.Chernarus\plotManagement\plotToggleMarkers.sqf, line 17

 

Also

 

if ((isPlayer _unit) && !(_charID in _friendlies)) then {

r_action>

Error position: <_charID in _friendlies)) then {

r_action>

Error Undefined variable in expression: _charid

File z\addons\dayz_code\compile\fn_damageActions.sqf, line 178

Error in expression

if(_unconscious) then {

r_action = true;

_a>

Error position: <_unconscious) then {

r_action = true;

_a>

Error Undefined variable in expression: _unconscious

File z\addons\dayz_code\compile\fn_damageActions.sqf, line 106">

 

Any help with this would be much appreciated.

Bump - Any help? Thanks

Link to comment
Share on other sites

Installed this, P4L maintenance to be specific, and the manage plot option is not showing up. Cant see any errors in RPTs so I'm out of my league. Ideas?

 

Scratch that. Had a typo in fn_selfactions. Option for managing the plot shows up but does nothing.

 

Now I can access it but adding plot friends doesnt work.

 

Double argh. Any ideas?

Link to comment
Share on other sites

Having some strange issue with PM, I'm assuming the number/300 at the top is the object limit of the plotpole however testing with one wood wall in the plotpole radius it displays 401/300 and then a minute later 11/301... Also when i add myself to the "plotfriends" and then die, i cannot build nor remove the plotpole.

 

I'm also getting this error in the client rpt

 

Error in expression < _x; } count PP_Marks; PP_Marks = nil; sleep 1;

};

if ((isNil "PP_Marks") && (>

Error position: };

if ((isNil "PP_Marks") && (>

Error Generic error in expression

File mpmissions\__CUR_MP.Chernarus\plotManagement\plotToggleMarkers.sqf, line 17

Suspending not allowed in this context

Error in expression < _x; } count PP_Marks; PP_Marks = nil; sleep 1;

};

if ((isNil "PP_Marks") && (>

Error position: };

if ((isNil "PP_Marks") && (>

Error Generic error in expression

File mpmissions\__CUR_MP.Chernarus\plotManagement\plotToggleMarkers.sqf, line 17

Suspending not allowed in this context

Error in expression < _x; } count PP_Marks; PP_Marks = nil; sleep 1;

};

if ((isNil "PP_Marks") && (>

Error position: };

if ((isNil "PP_Marks") && (>

Error Generic error in expression

File mpmissions\__CUR_MP.Chernarus\plotManagement\plotToggleMarkers.sqf, line 17

Suspending not allowed in this context

Error in expression < _x; } count PP_Marks; PP_Marks = nil; sleep 1;

};

if ((isNil "PP_Marks") && (>

Error position: };

if ((isNil "PP_Marks") && (>

Error Generic error in expression

File mpmissions\__CUR_MP.Chernarus\plotManagement\plotToggleMarkers.sqf, line 17

 

Also

 

if ((isPlayer _unit) && !(_charID in _friendlies)) then {

r_action>

Error position: <_charID in _friendlies)) then {

r_action>

Error Undefined variable in expression: _charid

File z\addons\dayz_code\compile\fn_damageActions.sqf, line 178

Error in expression

if(_unconscious) then {

r_action = true;

_a>

Error position: <_unconscious) then {

r_action = true;

_a>

Error Undefined variable in expression: _unconscious

File z\addons\dayz_code\compile\fn_damageActions.sqf, line 106">

 

Any help with this would be much appreciated.

Bumping again as this seems to be a serious issue.

Link to comment
Share on other sites

i cant seem to get this working for the death of me, im running aplotforlife  2.35 and gone through the tutorial 10-15 times and every player_build in my mission.pbo has the script in, but i can add people to my pole but they still cant build ? if anyone could take a look at my files, i can provide server and client RPT and mission and server pbo, i know its a alot to ask but im hoping somone is kind enough :D 

Link to comment
Share on other sites

Ok so ive got this error.

ErrorMessage: File mpmissions\DayZ_Epoch_11.Chernarus\plotManagement\plotManagement.hpp, line 5: /PlotManagement/Controls.RscText_7000: Undefined base class 'RscTextT'

I have the following mods installed. P4L, Vectors, Precise building, Snap pro, advanced trading and single currency 3.0.

 

I have the defines setup like this which I believe is correct  :o

class RscTitles
{
#include "ZSC\config\ZSChud.hpp"
};
#include "ZSC\config\ZSCdefines.hpp"
#include "ZSC\config\ZSCdialogs.hpp"
#include "plotManagement\plotManagement.hpp"
#include "zupa\advancedTrading\advancedTrading.hpp"

#include "custom\snap_pro\snappoints.hpp"

Any idea's

Link to comment
Share on other sites

i cant seem to get this working for the death of me, im running aplotforlife  2.35 and gone through the tutorial 10-15 times and every player_build in my mission.pbo has the script in, but i can add people to my pole but they still cant build ? if anyone could take a look at my files, i can provide server and client RPT and mission and server pbo, i know its a alot to ask but im hoping somone is kind enough :D

 

 

I posted the fix i did on my server for this.. And it works no one is having issues with building on their plot pole with friends or themselves. The plot pole owner puts themselves and their friends on the plot pole friends side and bam everyone can build. 

 

Dont feel bad I was pulling out my hair on this and went through every file until I finally found the solution. 

 

 

here is my fix once again. 

 

player_build_plotCheck.sqf 

if(!DZE_ActionInProgress) exitWith {};
//Check if nearby plotpoles exists
private ["_passArray","_isPole","_needText","_distance","_findNearestPoles","_findNearestPole","_IsNearPlot","_requireplot","_isLandFireDZ","_canBuildOnPlot","_nearestPole","_ownerID","_friendlies", "_playerUID","_plotcheck"];

//defines
_isPole = _this select 0;
_requireplot = _this select 1;
_isLandFireDZ = _this select 2;

_needText = localize "str_epoch_player_246"; //text for when requirements not met
_canBuildOnPlot = false;
_nearestPole = objNull;
_ownerID = 0;
_friendlies = [];

_plotcheck = [player, _isPole] call FNC_find_plots;
_distance = _plotcheck select 0;
_IsNearPlot = _plotcheck select 1;
_nearestPole = _plotcheck select 2;

// If item is plot pole && another one exists within 45m
if(_isPole && _IsNearPlot > 0) exitWith {  DZE_ActionInProgress = false; cutText [(format [localize "str_epoch_player_44", DZE_PlotPole select 1]) , "PLAIN DOWN"]; };

if(_IsNearPlot == 0) then {

	// Allow building of plotpole or items not requiring a plot pole
	if(!(_requireplot) || _isLandFireDZ) then {
		_canBuildOnPlot = true;
	};

} else {
	// Since there are plot poles nearby we need to check ownership && friend status

	_buildcheck = [player, _nearestPole] call FNC_check_owner;
	_isowner = _buildcheck select 0;
	_friendlies = _nearestPole getVariable ["plotfriends",[]];
	_fuid  = [];
		{
		_friendUID = _x select 0;
		_fuid  =  _fuid  + [_friendUID];
		} forEach _friendlies;
		_builder  = getPlayerUID player;
		// check if friendly to owner
	if(_builder in _fuid) then {
		_canBuildOnPlot = true;
	};
};


_passArray = [_IsNearPlot,_nearestPole,_ownerID,_friendlies,_distance]; //create new array and pass it to caller

// End script if item is plot pole and another one exists within defined radius
if(_isPole && _IsNearPlot > 0) exitWith { 
	DZE_ActionInProgress = false;
	cutText [(format [localize "str_epoch_player_44", DZE_PlotPole select 1]) , "PLAIN DOWN"];
	_passArray
};

if(!_canBuildOnPlot) exitWith { //end script if requirements were not met
	DZE_ActionInProgress = false;
	cutText [format[(localize "STR_EPOCH_PLAYER_135"),_needText,_distance] , "PLAIN DOWN"];
	_passArray
};
_passArray //[int,Obj,int,array]

Link to comment
Share on other sites

ok so put that one in and now serverside rpt showing :

20:39:50 Error in expression < _countr)];
};
_countr = _countr + 1;
} count _objWpnTypes; 
 
 
_objWpnTypes = (_>
20:39:50   Error position: <count _objWpnTypes; 
 
 
_objWpnTypes = (_>
20:39:50   Error count: Type String, expected Array
20:39:50 File z\addons\dayz_server\system\server_monitor.sqf, line 216
 
##edit.
when trying to join getting stuck on waiting for server to start authentication
Link to comment
Share on other sites

ive now got it launching but its giving me http://gyazo.com/0d2521bd0d90daa83218e8a442d04f2e 

line for calling initplotmanagement 

 

 

s_player_plotManagement = player addAction ["<t color='#0059FF'>Manage Plot</t>", "scripts\plotManagement\initPlotManagement.sqf", [], 5, false];  

 

 

line for calling fn self actions 

 

 

 

fnc_usec_selfActions = compile preprocessFileLineNumbers "compile\fn_selfActions.sqf";

 

 

 

 

 

error in the rpt: 

 

"DayZ Epoch: PRELOAD Functions\init [[L 1-1-A:1 REMOTE],any]"
"DayZ Epoch: MPframework inited"
Warning Message: Picture npg.paa not found
Warning Message: Picture npg.paa not found
Warning Message: Picture npg.paa not found
Warning Message: Picture npg.paa not found
Warning Message: Picture npg.paa not found
Warning Message: Picture npg.paa not found
Warning Message: Picture npg.paa not found
No speaker given for Andrew Vomacka
UH1Y_DZE: ObsTurret - unknown animation source ObsTurret
UH1Y_DZE: ObsGun - unknown animation source ObsGun
AH6X_DZ: FLIR_turret - unknown animation source FLIR_turret
AH6X_DZ: FLIR_gun - unknown animation source FLIR_gun
Fresnel k must be >0, given n=0.8,k=0
Fresnel k must be >0, given n=0.8,k=0
Warning Message: Script compile\fn_selfActions.sqf not found
Warning Message: Script plotManagement\plotGetFriends.sqf not found
Warning Message: Script plotManagement\plotNearbyHumans.sqf not found
Warning Message: Script plotManagement\plotAddFriend.sqf not found
Warning Message: Script plotManagement\plotRemoveFriend.sqf not found
"DEBUG: loadscreen guard started."
"Res3tting B!S effects..."
Warning: z\addons\dayz_communityassets\models\compass.p3d:0 Error while trying to generate ST for points: 863, 853, 852
"PLAYER RESULT: true"
Strange convex component93 in zero_buildings\models\mil_house_i.p3d:geometryView

Link to comment
Share on other sites

ive now got it launching but its giving me http://gyazo.com/0d2521bd0d90daa83218e8a442d04f2e 

line for calling initplotmanagement 

 

 

s_player_plotManagement = player addAction ["<t color='#0059FF'>Manage Plot</t>", "scripts\plotManagement\initPlotManagement.sqf", [], 5, false];  

 

 

line for calling fn self actions 

 

 

 

fnc_usec_selfActions = compile preprocessFileLineNumbers "compile\fn_selfActions.sqf";

 

 

 

 

 

error in the rpt: 

 

"DayZ Epoch: PRELOAD Functions\init [[L 1-1-A:1 REMOTE],any]"
"DayZ Epoch: MPframework inited"
Warning Message: Picture npg.paa not found
Warning Message: Picture npg.paa not found
Warning Message: Picture npg.paa not found
Warning Message: Picture npg.paa not found
Warning Message: Picture npg.paa not found
Warning Message: Picture npg.paa not found
Warning Message: Picture npg.paa not found
No speaker given for Andrew Vomacka
UH1Y_DZE: ObsTurret - unknown animation source ObsTurret
UH1Y_DZE: ObsGun - unknown animation source ObsGun
AH6X_DZ: FLIR_turret - unknown animation source FLIR_turret
AH6X_DZ: FLIR_gun - unknown animation source FLIR_gun
Fresnel k must be >0, given n=0.8,k=0
Fresnel k must be >0, given n=0.8,k=0
Warning Message: Script compile\fn_selfActions.sqf not found
Warning Message: Script plotManagement\plotGetFriends.sqf not found
Warning Message: Script plotManagement\plotNearbyHumans.sqf not found
Warning Message: Script plotManagement\plotAddFriend.sqf not found
Warning Message: Script plotManagement\plotRemoveFriend.sqf not found
"DEBUG: loadscreen guard started."
"Res3tting B!S effects..."
Warning: z\addons\dayz_communityassets\models\compass.p3d:0 Error while trying to generate ST for points: 863, 853, 852
"PLAYER RESULT: true"
Strange convex component93 in zero_buildings\models\mil_house_i.p3d:geometryView

 

 

You have everything set up correctly? by the looks of it you might not have plotManagment in the main mission file.. did you move it to custom or somethign?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...