I'm getting a silent crash. No error; only a vague message at the end of the log, and sometimes even that doesn't appear:
2015/04/29 02:58:05.581 DirectSound:音声データ解放[C:/Users/Kook/Desktop/TISTUFF/.touhou/th_dnh_ph3_1pre6/th_dnh_ph3/script/CYws/cy5/se/cut00.wav]
2015/04/29 02:58:05.583 DirectSound:音声データ解放[C:/Users/Kook/Desktop/TISTUFF/.touhou/th_dnh_ph3_1pre6/th_dnh_ph3/script/CYws/cy5/se/eco01.wav]
2015/04/29 02:58:05.585 DirectSound:音声データ解放[C:/Users/Kook/Desktop/TISTUFF/.touhou/th_dnh_ph3_1pre6/th_dnh_ph3/script/CYws/cy5/se/freeze07.wav]
2015/04/29 02:58:05.588 DirectSound:音声データ解放[C:/Users/Kook/Desktop/TISTUFF/.touhou/th_dnh_ph3_1pre6/th_dnh_ph3/script/CYws/cy5/se/loop001.wav]
2015/04/29 02:58:05.589 DirectSound:音声データ解放[C:/Users/Kook/Desktop/TISTUFF/.touhou/th_dnh_ph3_1pre6/th_dnh_ph3/script/CYws/cy5/se/on01.wav]
2015/04/29 02:58:05.590 DirectSound:音声データ解放[C:/Users/Kook/Desktop/TISTUFF/.touhou/th_dnh_ph3_1pre6/th_dnh_ph3/script/CYws/cy5/se/paper00.wav]
2015/04/29 02:58:05.592 DirectSound:音声データ解放[C:/Users/Kook/Desktop/TISTUFF/.touhou/th_dnh_ph3_1pre6/th_dnh_ph3/script/CYws/cy5/se/power14.wav]
2015/04/29 02:58:05.594 DirectInput:終了開始
2015/04/29 02:58:05.595 DirectSound:音声データ解放[C:/Users/Kook/Desktop/TISTUFF/.touhou/th_dnh_ph3_1pre6/th_dnh_ph3/script/CYws/cy5/se/sha00.wav]
2015/04/29 02:58:05.596 DirectInput:終了完了
2015/04/29 02:58:05.600 DirectSound:終了開始
2015/04/29 02:58:05.600 DirectSound:音声データ解放[C:/Users/Kook/Desktop/TISTUFF/.touhou/th_dnh_ph3_1pre6/th_dnh_ph3/script/CYws/cy5/system/se/seUseSpellCard.wav]
2015/04/29 02:58:05.712 DirectSound:終了完了
2015/04/29 02:58:05.717 ShaderManager:Shaderを解放しました(Shader Released)[ float4 lightDirection;
float4 materialAmbient : MATERIALA]
2015/04/29 02:58:05.719 TextureManager:テクスチャを解放しました[__RESERVED_RENDER_TARGET__2]
2015/04/29 02:58:05.720 TextureManager:テクスチャを解放しました[__RESERVED_RENDER_TARGET__1]
2015/04/29 02:58:05.721 TextureManager:テクスチャを解放しました[__RESERVED_RENDER_TARGET__0]
2015/04/29 02:58:05.722 TextureManager:テクスチャを解放しました[__RENDERTARGET_TRANSITION__]
2015/04/29 02:58:05.724 DirectGraphics:終了開始
2015/04/29 02:58:05.725 DirectGraphics:終了完了
2015/04/29 02:58:05.727 アプリケーション終了処理完了
Obligatory code:
#TouhouDanmakufu[Single]
#ScriptVersion[3]
#Title["St1 Sp3"]
#Text["Third spell!"]
#Player["./../../player/player0.dnh"]
#System["./../../system/system.dnh"]
#include "./../../prologue.dnh"
#include "./../../player/shotc.dnh"
let id = 28;
let level = 7;
#include "./../spell_header.dnh"
#include "./render_boss.dnh"
@Event {
alternative (GetEventType)
case (EV_REQUEST_LIFE) {
SetScriptResult(6000);
}
case (EV_REQUEST_TIMER) {
SetScriptResult(72);
}
case (EV_REQUEST_IS_DURABLE_SPELL) {
SetScriptResult(true);
}
case (EV_REQUEST_SPELL_SCORE) {
SetScriptResult(spellBonus);
}
}
@Finalize {}
task TWork {
let height = GetStgFrameHeight;
let width = GetStgFrameWidth;
ObjEnemy_SetDamageRate(objBoss, 0, 0);
let d = getDifficulty;
let speed = 1 + 0.1 * d;
let count = truncate(1 + 0.34 * d);
let period = 240 / (1 + 0.15 * d);
let ways = 16 + 4 * d;
ascent (i in 0 .. 21) {
loop (count) {
let s = createCircleShot(width / 2, height / 2, 15 * i, period / rand(-1, 1), rand(0, 360),
DS_BALL_M_A_RED + truncate(rand(0, 8)), 120, 99999);
ObjShot_SetSpellResist(s, true);
ObjShot_SetAutoDelete(s, false);
}
}
task amulet(s, g) {
ObjMove_SetAngularVelocity(s, m * g);
wait(30);
ObjMove_SetAngularVelocity(s, 0);
}
let m = 1;
while (!isDead) {
let g = randomSign;
let a = GetAngleToPlayer(objBoss - 30 * m * g);
loop (ways) {
let s = CreateShotOA1(objBoss, 2.9, a, DS_BILL_RED, 0);
amulet(s, g);
a += 360 / ways;
}
m += 0.05;
wait(period / 3);
}
ObjEnemy_SetDamageRate(objBoss, 100, 100);
}
And no, it's probably not a divide-by-zero error.
Edit: yep, misplaced parenthesis. I don't know why DNH doesn't show an error such as "Attempted operation on invalid object".