hedgewars/uScript.pas
changeset 10122 cefede760264
parent 10108 c68cf030eded
child 10127 7f29a65aa1e4
equal deleted inserted replaced
10121:8b65699beb56 10122:cefede760264
   226 
   226 
   227 function lc_showmission(L : Plua_State) : LongInt; Cdecl;
   227 function lc_showmission(L : Plua_State) : LongInt; Cdecl;
   228 begin
   228 begin
   229     if lua_gettop(L) = 5 then
   229     if lua_gettop(L) = 5 then
   230         begin
   230         begin
   231         ShowMission(lua_tolstring(L, 1, nil), lua_tolstring(L, 2, nil), lua_tolstring(L, 3, nil), lua_tointeger(L, 4), lua_tointeger(L, 5));
   231         ShowMission(lua_tostring(L, 1), lua_tostring(L, 2), lua_tostring(L, 3), lua_tointeger(L, 4), lua_tointeger(L, 5));
   232         end
   232         end
   233     else
   233     else
   234         LuaParameterCountError('ShowMission', 'caption, subcaption, text, icon, time', lua_gettop(L));
   234         LuaParameterCountError('ShowMission', 'caption, subcaption, text, icon, time', lua_gettop(L));
   235     lc_showmission:= 0;
   235     lc_showmission:= 0;
   236 end;
   236 end;
   306 end;
   306 end;
   307 
   307 
   308 function lc_addcaption(L : Plua_State) : LongInt; Cdecl;
   308 function lc_addcaption(L : Plua_State) : LongInt; Cdecl;
   309 begin
   309 begin
   310     if lua_gettop(L) = 1 then
   310     if lua_gettop(L) = 1 then
   311         AddCaption(lua_tolstring(L, 1, nil), cWhiteColor, capgrpMessage)
   311         AddCaption(lua_tostring(L, 1), cWhiteColor, capgrpMessage)
   312     else if lua_gettop(L) = 3 then
   312     else if lua_gettop(L) = 3 then
   313         begin
   313         begin
   314         AddCaption(lua_tolstring(L, 1, nil), lua_tointeger(L, 2) shr 8, TCapGroup(lua_tointeger(L, 3)));
   314         AddCaption(lua_tostring(L, 1), lua_tointeger(L, 2) shr 8, TCapGroup(lua_tointeger(L, 3)));
   315         end
   315         end
   316     else
   316     else
   317         LuaParameterCountError('AddCaption', 'text[, color, captiongroup]', lua_gettop(L));
   317         LuaParameterCountError('AddCaption', 'text[, color, captiongroup]', lua_gettop(L));
   318     lc_addcaption:= 0;
   318     lc_addcaption:= 0;
   319 end;
   319 end;