diff -r c6ecb87b3231 -r 854caa3c9212 hedgewars/uScript.pas --- a/hedgewars/uScript.pas Tue Jul 10 16:25:58 2018 +0200 +++ b/hedgewars/uScript.pas Tue Jul 10 16:44:13 2018 +0200 @@ -544,9 +544,13 @@ end; function lc_showmission(L : Plua_State) : LongInt; Cdecl; +var n: LongInt; begin - if CheckLuaParamCount(L, 5, 'ShowMission', 'caption, subcaption, text, icon, time') then - ShowMission(lua_tostringA(L, 1), lua_tostringA(L, 2), lua_tostringA(L, 3), Trunc(lua_tonumber(L, 4)), Trunc(lua_tonumber(L, 5))); + if CheckAndFetchParamCount(L, 5, 6, 'ShowMission', 'caption, subcaption, text, icon, time [, forceDisplay]', n) then + if n = 5 then + ShowMission(lua_tostringA(L, 1), lua_tostringA(L, 2), lua_tostringA(L, 3), Trunc(lua_tonumber(L, 4)), Trunc(lua_tonumber(L, 5))) + else + ShowMission(lua_tostringA(L, 1), lua_tostringA(L, 2), lua_tostringA(L, 3), Trunc(lua_tonumber(L, 4)), Trunc(lua_tonumber(L, 5)), lua_toboolean(L, 6)); lc_showmission:= 0; end;