Показать сообщение отдельно
Старый 03.07.2011, 15:32   #3431
Игрок
 
Аватар для MBM98
 
Регистрация: 14.07.2010
Адрес: Между складками Логвинова
Сообщений: 890
Репутация: 100 [+/-]
Сделал такой скрипт -
Код:
function af_psy_phant()
if phantom_manager:phantom_count()<3 and db.actor.psy_health<0.8 then
local act_pos = db.actor:position()
local x_act = math.random(5,15)
local z_act = math.random(5,15)
local pos_vector = vector():set(act_pos.x + x_act, act_pos.y, act_pos.z + z_act)
if db.actor:alive() then
phantom_manager.spawn_phantom(pos_vector)
end
end
И прописал в апдей в бинд сталкер.

Вот так - af_psy.af_psy_phant()

Так вот - вылетает с логом -
Скрытый текст:
Expression : !m_error_code
Function : raii_guard::~raii_guard
File : D:\prog_repository\sources\trunk\xrServerEntities\ script_storage.cpp
Line : 748
Description : .... - Зов Припяти\gamedata\scripts\bind_stalker*****ipt:270: attempt to index global 'af_psy' (a nil value)

Как исправить вылет?
__________________
Ice blue silver sky
Fades into grey
To a grey hope that omens to be
Starless and bible black
MBM98 вне форума  
Ответить с цитированием