Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
pekar0201

Помогите исправить ошибку в скрипте!

Есть скрипт:

 

doobreath = {
	private ["_pos", "_ps"];
	sleep random 2;
	_pos = _this selectionposition "neck";
	while {_this distance player < 800 and alive _this and vehicle _this == _this and _pos select 2 != 0} do {
		_pos = _this selectionposition "neck";
		_ps = "#particlesource" createvehiclelocal getpos _this;
		_ps setparticleparams [["\ca\data\particleeffects\universal\universal.p3d", 16, 12, 13, 0], "", "Billboard", 0.5, 0.5, [_pos select 0, (_pos select 1) + 0.15, _pos select 2], [0, 0.2, -0.2], 1, 1.275, 1, 0.2, [0, 0.2, 0], [[1, 1, 1, 0.01], [1, 1, 1, 0.01], [1, 1, 1, 0]], [1000], 1, 0.04, "", "", _this];
		_ps setparticlerandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
		_ps setdropinterval 0.001;
		_this setvariable ["runningbreath", floor time + 5];
		sleep 0.5;
		deletevehicle _ps;
		sleep 2 + random 2;
	};
};
 
[] spawn {
	while {true} do {
		sleep 5;
		_nearGetBreath = nearestobjects [player, ["Man"], 500];
		{
			if (!(_x isKindOf "zZombie_base") and alive _x and vehicle _x == _x and _x getvariable ["runningbreath", -1] < time) then {
				_x setvariable ["runningbreath", floor time + 5];
				_x spawn doobreath;
			};
		} foreach _nearGetBreath;
	};
};
 

И есть ошибка в РПТ:

 

>
  Error Undefined variable in expression: _neargetbreath
File mpmissions\__cur_mp.Chernarus_winter\scripts\breathfog.sqf, line 26
Error in expression < + 5];
_x spawn doobreath;
};
} foreach _nearGetBreath;
};
};
>
  Error position: <_nearGetBreath;
};
};

Как фиксить??

P.S. Скрипт работает, но хотелось-бы убрать ошибку с РПТ...

Share this post


Link to post
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Есть скрипт:

 

 

doobreath = {
	private ["_pos", "_ps"];
	sleep random 2;
	_pos = _this selectionposition "neck";
	while {_this distance player < 800 and alive _this and vehicle _this == _this and _pos select 2 != 0} do {
		_pos = _this selectionposition "neck";
		_ps = "#particlesource" createvehiclelocal getpos _this;
		_ps setparticleparams [["\ca\data\particleeffects\universal\universal.p3d", 16, 12, 13, 0], "", "Billboard", 0.5, 0.5, [_pos select 0, (_pos select 1) + 0.15, _pos select 2], [0, 0.2, -0.2], 1, 1.275, 1, 0.2, [0, 0.2, 0], [[1, 1, 1, 0.01], [1, 1, 1, 0.01], [1, 1, 1, 0]], [1000], 1, 0.04, "", "", _this];
		_ps setparticlerandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
		_ps setdropinterval 0.001;
		_this setvariable ["runningbreath", floor time + 5];
		sleep 0.5;
		deletevehicle _ps;
		sleep 2 + random 2;
	};
};
 
[] spawn {
	while {true} do {
		sleep 5;
		_nearGetBreath = nearestobjects [player, ["Man"], 500];
		{
			if (!(_x isKindOf "zZombie_base") and alive _x and vehicle _x == _x and _x getvariable ["runningbreath", -1] < time) then {
				_x setvariable ["runningbreath", floor time + 5];
				_x spawn doobreath;
			};
		} foreach _nearGetBreath;
	};
};
 

И есть ошибка в РПТ:

 

>
  Error Undefined variable in expression: _neargetbreath
File mpmissions\__cur_mp.Chernarus_winter\scripts\breathfog.sqf, line 26
Error in expression < + 5];
_x spawn doobreath;
};
} foreach _nearGetBreath;
};
};
>
  Error position: <_nearGetBreath;
};
};

Как фиксить??

 

P.S. Скрипт работает, но хотелось-бы убрать ошибку с РПТ...

Неопределённая переменная _nearGetBreath

Объяви её в секции "private ["_nearGetBreath"];"

 

[] spawn {
	private ["_nearGetBreath"];
	while {true} do {
		sleep 5;
		_nearGetBreath = nearestobjects [player, ["Man"], 500];
		{
			if (!(_x isKindOf "zZombie_base") and alive _x and vehicle _x == _x and _x getvariable ["runningbreath", -1] < time) then {
				_x setvariable ["runningbreath", floor time + 5];
				_x spawn doobreath;
			};
		} foreach _nearGetBreath;
	};
};
 

Share this post


Link to post
Share on other sites



  • 0

 

Неопределённая переменная _nearGetBreath

Объяви её в секции "private ["_nearGetBreath"];"

 

[] spawn {
	private ["_nearGetBreath"];
	while {true} do {
		sleep 5;
		_nearGetBreath = nearestobjects [player, ["Man"], 500];
		{
			if (!(_x isKindOf "zZombie_base") and alive _x and vehicle _x == _x and _x getvariable ["runningbreath", -1] < time) then {
				_x setvariable ["runningbreath", floor time + 5];
				_x spawn doobreath;
			};
		} foreach _nearGetBreath;
	};
};
 

Теперь вот такая ошибка(

 

 

  Error position: <nearestobjects [player, ["Man"], 500];
{>
  Error 0 elements provided, 3 expected
File mpmissions\__cur_mp.Chernarus_winter\scripts\breathfog.sqf, line 22
Bad conversion: array
Error in expression <e {true} do {
sleep 5;
_nearGetBreath = nearestobjects [player, ["Man"], 500];
{>

Share this post


Link to post
Share on other sites
  • 0

Сам скрипт скинь под спойлер

Кидал скрипт выше, внимательней посмотри.

Share this post


Link to post
Share on other sites
  • 0

 

Теперь вот такая ошибка(

 

 

  Error position: <nearestobjects [player, ["Man"], 500];
{>
  Error 0 elements provided, 3 expected
File mpmissions\__cur_mp.Chernarus_winter\scripts\breathfog.sqf, line 22
Bad conversion: array
Error in expression <e {true} do {
sleep 5;
_nearGetBreath = nearestobjects [player, ["Man"], 500];
{>

Пробуй преобразовать код

В данный вид например:

 

[] spawn {
	while {true} do {
		sleep 5;
		{
			if (!(_x isKindOf "zZombie_base") and alive _x and vehicle _x == _x and _x getvariable ["runningbreath", -1] < time) then {
				_x setvariable ["runningbreath", floor time + 5];
				_x spawn
				{
				private ["_pos", "_ps"];
				sleep random 2;
				_pos = _this selectionposition "neck";
				while {_this distance player < 800 and alive _this and vehicle _this == _this and _pos select 2 != 0} do {
					_pos = _this selectionposition "neck";
					_ps = "#particlesource" createvehiclelocal getpos _this;
					_ps setparticleparams [["\ca\data\particleeffects\universal\universal.p3d", 16, 12, 13, 0], "", "Billboard", 0.5, 0.5, [_pos select 0, (_pos select 1) + 0.15, _pos select 2], [0, 0.2, -0.2], 1, 1.275, 1, 0.2, [0, 0.2, 0], [[1, 1, 1, 0.01], [1, 1, 1, 0.01], [1, 1, 1, 0]], [1000], 1, 0.04, "", "", _this];
					_ps setparticlerandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
					_ps setdropinterval 0.001;
					_this setvariable ["runningbreath", floor time + 5];
					sleep 0.5;
					deletevehicle _ps;
					sleep 2 + random 2;
					};
				};
			};
		} foreach (nearestobjects [player, ["Man"], 500]);
	};
};
Edited by Loot (see edit history)

Share this post


Link to post
Share on other sites
  • 0

 

Теперь вот такая ошибка(

 

 

  Error position: <nearestobjects [player, ["Man"], 500];
{>
  Error 0 elements provided, 3 expected
File mpmissions\__cur_mp.Chernarus_winter\scripts\breathfog.sqf, line 22
Bad conversion: array
Error in expression <e {true} do {
sleep 5;
_nearGetBreath = nearestobjects [player, ["Man"], 500];
{>

_nearGetBreath = nearestobjects [player, ["Man"], 500];

Замени на

_nearGetBreath = nearestobjects [(getPosATL player), ["Man"], 500];

Share this post


Link to post
Share on other sites
  • 0

_nearGetBreath = nearestobjects [player, ["Man"], 500];

Замени на

_nearGetBreath = nearestobjects [(getPosATL player), ["Man"], 500];

Спасибо, помог! Вот есть ещё 1 проблемка :)

 

Обнаружил ещё 1 ошибку, но уже в другом скрипте...  :wacko:

File z\addons\dayz_server\DZAI\scripts\setup_autoStaticSpawns.sqf, line 15
Error in expression < {
private ["_nearbldgs"];
_nearbldgs = _triggerPos nearObjects ["HouseBase",250>
  Error position: <_triggerPos nearObjects ["HouseBase",250>
  Error Undefined variable in expression: _triggerpos

Вот строка на которую сервер жалуется.

 

_nearbldgs = _triggerPos nearObjects ["HouseBase",250];

А то я дуб в этом :)

Edited by FROZ (see edit history)

Share this post


Link to post
Share on other sites
  • 0

а что делает этот скрипт?

Вроде туман на сервер добавляет

Share this post


Link to post
Share on other sites
  • 0


SP_doobreath = {

private ['_pos', '_ps'];

uiSleep random 2;

_pos = _this selectionposition 'neck';

while {_this distance player < 800 and alive _this and vehicle _this == _this and _pos select 2 != 0} do {

_pos = _this selectionposition 'neck';

_ps = '#particlesource' createvehiclelocal getpos _this;

_ps setparticleparams [['\ca\data\particleeffects\universal\universal.p3d', 16, 12, 13, 0], '', 'Billboard', 0.5, 0.5, [_pos select 0, (_pos select 1) + 0.15, _pos select 2], [0, 0.2, -0.2], 1, 1.275, 1, 0.2, [0, 0.2, 0], [[1, 1, 1, 0.01], [1, 1, 1, 0.01], [1, 1, 1, 0]], [1000], 1, 0.04, '', '', _this];

_ps setparticlerandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];

_ps setdropinterval 0.001;

_this setvariable ['runningbreath', floor time + 5];

uiSleep 0.5;

deletevehicle _ps;

uiSleep 2 + random 2;

};

};

 

[] spawn {

while {true} do {

uiSleep 5;

_nearGetBreath = nearestobjects [player, ['Man'], 500];

{

if (!(_x isKindOf 'zZombie_base') and alive _x and vehicle _x == _x and _x getvariable ['runningbreath', -1] < time) then {

_x setvariable ['runningbreath', floor time + 5];

_x spawn SP_doobreath;

};

} foreach _nearGetBreath;

};

};

// рабочий, без ошибок.

Share this post


Link to post
Share on other sites
  • 0

 

SP_doobreath = {
	private ['_pos', '_ps'];
	uiSleep random 2;
	_pos = _this selectionposition 'neck';
	while {_this distance player < 800 and alive _this and vehicle _this == _this and _pos select 2 != 0} do {
		_pos = _this selectionposition 'neck';
		_ps = '#particlesource' createvehiclelocal getpos _this;
		_ps setparticleparams [['\ca\data\particleeffects\universal\universal.p3d', 16, 12, 13, 0], '', 'Billboard', 0.5, 0.5, [_pos select 0, (_pos select 1) + 0.15, _pos select 2], [0, 0.2, -0.2], 1, 1.275, 1, 0.2, [0, 0.2, 0], [[1, 1, 1, 0.01], [1, 1, 1, 0.01], [1, 1, 1, 0]], [1000], 1, 0.04, '', '', _this];
		_ps setparticlerandom [2, [0, 0, 0], [0.25, 0.25, 0.25], 0, 0.5, [0, 0, 0, 0.1], 0, 0, 10];
		_ps setdropinterval 0.001;
		_this setvariable ['runningbreath', floor time + 5];
		uiSleep 0.5;
		deletevehicle _ps;
		uiSleep 2 + random 2;
	};
};

[] spawn {
	while {true} do {
		uiSleep 5;
		_nearGetBreath = nearestobjects [player, ['Man'], 500];
		{
			if (!(_x isKindOf 'zZombie_base') and alive _x and vehicle _x == _x and _x getvariable ['runningbreath', -1] < time) then {
				_x setvariable ['runningbreath', floor time + 5];
				_x spawn SP_doobreath;
			};
		} foreach _nearGetBreath;
	};
};
// рабочий, без ошибок.

И в чём отличие с тем, что у ТС?

Теже яйца, только в профиль.)

 

Спасибо, помог! Вот есть ещё 1 проблемка :)

 

Обнаружил ещё 1 ошибку, но уже в другом скрипте...  :wacko:

File z\addons\dayz_server\DZAI\scripts\setup_autoStaticSpawns.sqf, line 15
Error in expression < {
private ["_nearbldgs"];
_nearbldgs = _triggerPos nearObjects ["HouseBase",250>
  Error position: <_triggerPos nearObjects ["HouseBase",250>
  Error Undefined variable in expression: _triggerpos

Вот строка на которую сервер жалуется.

 

_nearbldgs = _triggerPos nearObjects ["HouseBase",250];

А то я дуб в этом :)

Выложи весь скрипт setup_autoStaticSpawns.sqf целиком, чтоб наглядней было.

Share this post


Link to post
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

  • Similar Content

    • By Miduznya
      Люди помогите кто знает, перепробовал множество вариантов
      ехе качал с сайта ragezone который типа переделан и в нем не работает БЕ
      но если зайти на сервер и выключить БЕ на клиенте через лаунчер, с сервера кикает, так что этот вариант не рабочий
      battleye = 0; тоже ничего не дает, кикает с сервера тоже.
      если не хотите тут можно и в лс , буду рад любой помощи.
    • By 123new
      В данной теме я ничего не прошу. Эта тема исключительно для обмена информацией и файлами со Steam мастерской и инструментов Steam, преимущественно для тех. кто не может их загрузить сам по тем или иным причинам.
       
      Форма запроса:
      1. Помогите скачать: {название и ссылка на необходимое вам, можно перечислить списком}
      2. Предпочитаю скачивать через: {названия облачных хранилищ, torrent, если работает}
      3. Буду ждать результата до: {дата, время по GMT+3, до которой вы ждете что вам помогут}
       
      Обращаю внимание, что все запросы и помощь исключительно добровольные между всеми форумчанами, никто ничем никому не обязан. Если по какой-то причине вам никто не может помочь загрузить файлы ищите свои способы это сделать сами.
      Форма запроса рекоммендуемая, но не обязательная в теме.
       
      ВАЖНО!! Благодарности за помощь оставлять в виде поднятия репутации автору за сообщение с нужной вам ссылкой.
    • By JEKA666
      Кто нибудь знает как настроить( Х ) НА  лут в лучах и рыбалку какие команды прописывать? Хочется чтоб они приносили что-то нужное и полезное или только модом.
    • By AndreiWagner
      Есть скрипт. На последнем exile, работает, но спамит в рпт ошибку. Просьба к профи. Желательно @NoNameUltima глянуть. Нужно сделать работу скрипта без ошибок
    • By danulo95
      здраствуйте подскажите каким образом можна реализировать привязку UID\GUID к никнейму игрока штоб викоренить смену никнеймов на сервере
  • Our picks

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.