Jump to content
  • 0

Error Undefined variable in expression: _maxdist


rhammer2003

Question

Hello All,

 

I have been receiving the following error alot lately, anyone have any clue what may be causeing this?

 

17:11:22   Error Undefined variable in expression: _maxdist
17:11:22 File ca\modules\functions\misc\fn_findSafePos.sqf, line 90
17:11:22 Error in expression < "_newY", "_testPos"];
_newX = _posX + (_maxDist - (random (_maxDist * 2)));
_ne>
17:11:22   Error position: <_maxDist - (random (_maxDist * 2)));
_ne>

 

and

 

17:11:22   Error Undefined variable in expression: _maxdist
17:11:22 File ca\modules\functions\misc\fn_findSafePos.sqf, line 90
17:11:22 Error in expression <enter position was passed!"; []};

if (_maxDist == -1) then
{
_maxDist = getNu>
17:11:22   Error position: <_maxDist == -1) then
{
_maxDist = getNu>
17:11:22   Error Undefined variable in expression: _maxdist
17:11:22 File ca\modules\functions\misc\fn_findSafePos.sqf, line 71
17:11:22 Error in expression <

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

ok I am having a problem with this file.

 

17:11:22   Error Undefined variable in expression: _maxdist
17:11:22 File ca\modules\functions\misc\fn_findSafePos.sqf, line 90

 

where do I find this and to ask the same question again, what do I need to do here? add a variable? I have read the linked post and it talks about missing variables

I am not an expert scripter but I do understand quite a bit.

just pointing me to the above link does not really help me.

Link to comment
Share on other sites

  • 0

Hi,

 

look at this: https://github.com/vbawol/DayZ-Epoch/issues/1393

 

Normally these errors happen in custom scripts...so these are easy to fix. In this case as vbawol pointed out it could also happen if nil values will be send to a function (here fn_findSafePos).

This is not so easy to find if there are many calls to that function ;)

If you have a program that helps you seaching for strings in 'all files' in a folder you may search for findSafePos all over your mission files and check the places where this occurs for variables used in the call which are uninitialized (nil). I guess it's a call in the mission but could also be within the server files if you added code there which uses this function.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...