Ho-hum...... quirky lua would seem to be giving me headaches again. I'm getting VERY close to being able to release a RC build (yes, RC not beta, dun-dun-dunnn!) but I have one obstacle being a huge pain in my backside. I'm heavily upgrading blowouts and almost everything is working great (I'm using a modified version of the merged dexx and dez0wave blowouts). Everything works apart from one aspect which as far as I can see shouldn't be causing a problem. What I've done is add the ability for human NPCs to also spawn during/after the blowout, exact process;
made a "npcs.ltx" file to be "read"
added self.npcs = parser.read_section([[blowout\npcs.ltx]], level.name(), "parse_npcs") to blowout.script
added spawn_npcs section to blowout.ltx
adjusted math.random and frequency of blowouts
Now, the blowout phase happens just fine, but shortly after the blowout SoC CTDs with loads of errors (see attachment) complaining about line 396 in state_mgr.script and line 13 of state_mgr_weapon.script. Couple examples;
FATAL ERROR
[error]Expression : fatal error
[error]Function : CScriptEngine::lua_error
[error]File : E:\stalker\sources\trunk\xr_3da\xrGame\script_engine.cpp
[error]Line : 73
[error]Description : <no expression>
[error]Arguments : LUA error: ...f chernobyl\gamedata\scripts\state_mgr_weapon.script:13: attempt to index field '?' (a nil value)
stack trace:
Scheduler tried to update object esc_shustryi
! Unknown command: dbg:_ERROR:_ILLEGAL_SET_STATE_CALLED!!!_nil_fo_esc_novice_attacker2
FATAL ERROR
[error]Expression : fatal error
[error]Function : CScriptEngine::lua_error
[error]File : E:\stalker\sources\trunk\xr_3da\xrGame\script_engine.cpp
[error]Line : 73
[error]Description : <no expression>
[error]Arguments : LUA error: ...hadow of chernobyl\gamedata\scripts\state_mgr.script:396: attempt to index field '?' (a nil value)
stack trace:
Scheduler tried to update object esc_blokpost_commander
Any ideas guys?