Jump to content
Sign in to follow this  
[aps]gnat

Visitor script error

Recommended Posts

A script to force the seabed lower ....

Can someone explain to me why this simple script doesn't work ?

LowerSeaBed

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

private["_params", "_doc", "_area", "_vertices", "_test", "_returnValues", "_tempX", "_tempY", "_tempZ"];

// gets document and area

_params = _this;

_doc = _params select 0;

_area = _params select 1;

// gets the vertices under the area

_vertices = _doc getVerticesUnder _area;

// ------------------------

// gets the vertices number

// ------------------------

_nVertices = count _vertices;

_newVertices = [];

{

_tempX = _x select 0;

_tempY = _x select 1;

_tempZ = _x select 2;

if(_tempZ <= -18) then

{

_tempZ = _tempZ - 50;

_newVertices = _newVertices + [[_tempX, _tempY, _tempZ]];

};

} forEach _vertices;

_newVertices setVerticesTo _doc;

Error comes like this which seems useless.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_doc = _params select 0;

_area = _params select 1;

_vertices = _doc getVerticesUnder _area;

_nVertices = count _vertices;

_newVertices = [];

{

_tempX = _x select 0;

_tempY = _x select 1;

_tempZ = _x select 2;

if(_tempZ <= -18) then

{

_tempZ = _t>

 Error

Share this post


Link to post
Share on other sites

Nobody ?

BTW, that is my whole script there, do you have to have a Dialog for every script maybe?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×