diff options
author | mekolat <mekolat@users.noreply.github.com> | 2015-05-20 13:22:05 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2015-05-20 13:22:05 -0400 |
commit | ab836451986e596d66df6aadd6af7a955ae8ff4e (patch) | |
tree | 7db3afc5f050564d9dcbdbac25d18563a879f666 /src/map/script-fun.cpp | |
parent | c0ada60ff51a7166f782a88e56e7a880e4e34650 (diff) | |
download | tmwa-ab836451986e596d66df6aadd6af7a955ae8ff4e.tar.gz tmwa-ab836451986e596d66df6aadd6af7a955ae8ff4e.tar.bz2 tmwa-ab836451986e596d66df6aadd6af7a955ae8ff4e.tar.xz tmwa-ab836451986e596d66df6aadd6af7a955ae8ff4e.zip |
use abort instead of runflag on errors
Diffstat (limited to 'src/map/script-fun.cpp')
-rw-r--r-- | src/map/script-fun.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index 7617e0d..3949627 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -110,8 +110,7 @@ void builtin_goto(ScriptState *st) { PRINTF("fatal: script: goto: not label !\n"_fmt); st->state = ScriptEndState::END; - runflag = 0; - return; + abort(); } st->scriptp.pos = conv_num(st, &AARG(0)); @@ -152,7 +151,7 @@ void builtin_callfunc(ScriptState *st) { PRINTF("fatal: script: callfunc: function not found! [%s]\n"_fmt, str); st->state = ScriptEndState::END; - runflag = 0; + abort(); } } OMATCH_END (); @@ -296,8 +295,7 @@ void builtin_menu(ScriptState *st) { PRINTF("fatal: script:menu: not a label\n"_fmt); st->state = ScriptEndState::END; - runflag = 0; - return; + abort(); } st->scriptp.pos = AARG(arg_index).get_if<ScriptDataPos>()->numi; st->state = ScriptEndState::GOTO; |